Re:Stop using strncpy already
by primitur on Thursday April 04, 2013 @03:34AM
(#5491467)
edit: oops. Coverage before Coffee!
[ Parent
| on HN ]
The string: [This ] The len: 5
Doesn't it bother you that your 5 character long buffer that is supposed to be terminated by a null happens to have 5 characters in it "[This ]" instead of 4 visible "[This]"?Your memory just happens to have a null 6 bytes after the pointer.