Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

C++ Language/Std/Strings/AvoidingBufferOverrun

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Some of the original C-Runtime functions were succeptible to a buffer-overrun-hack. For example, strnlen(NULL, 16) would cause a runtime-error. A safer alternative is available in Win32; strnlen_s(NULL, 16) simply returns 0 without trying to overrun the buffer. Additional information about avoiding buffer-overrun