Re:Beware of strncpy and strncat
by BadThink6655321 on Wednesday June 06, 2018 @12:25PM
(#17248451)
The first is inefficient. The declaration statement writes eight zeros to dest. strncpy() writes len bytes of zeros to dest, then copies the string, stopping at fewer than len bytes if a NUL is found in the src.
[ Parent
| on HN ]
There are no comments on this comment yet.