Re:Beware of strncpy and strncat
by DSMan195276 on Wednesday June 06, 2018 @10:36PM
(#17252822)
Huh, well that's embarrassing. It looks like it's still in there too. I googled the man page but I guess I saw an older version. I might submit a patch if I find time. It should really be something like this:
Of course, the error isn't super huge considering if you're using a zero-length buffer as a null-terminated string you're going to have other problems. But they still do check for 0, so IMO it's worth correcting.
[ Parent
| on HN ]
Matthew Kilgore submitted patch to fix this:
Huh, I blindly pasted example assuming man pages are always right. Double check next time :D
Re:Beware of strncpy and strncat
by DSMan195276 on Thursday June 07, 2018 @08:58AM
(#17255340)
Yes, that would be me :)