News for hackers. Stuff that matters.
Re:Git's list of banned C functions by syncsynchalt on Thursday March 04, 2021 @06:01PM (#26349741)
strncpy is a dangerous function because it doesn't nul terminate on overflow. The danger is that it's named misleadingly (str* functions otherwise always work in nul-terminated strings).

(strcpy is just banned because there's no bounds check, and they want to force use of strlcpy instead).

Re:Git's list of banned C functions by loeg on Thursday March 04, 2021 @09:01PM (#26351541)
strncpy also has the dubious behavior of zero-filling out to N even if strlen(src) is much shorter than N.