Content deleted Content added
→Buffer-overflow prevention: terminate last character with NUL |
Removing link(s) to "Secure by default": Removing links to deleted page Secure by default. |
||
(One intermediate revision by one other user not shown) | |||
Line 24:
// copy a maximum of BUF_SIZE bytes
strncpy(dst, user_input, BUF_SIZE);
// set the last character in the buffer to NUL
dst[BUF_SIZE -1] = '\0';
}
Line 82:
* [[Defensive programming]]
* [[Security bug]]
*
== Notes ==
|