Skip to contentSkip to conversation

blind conversion strncpy -> strlcpy is harmful

DISCUSSION [email protected] 1 participant 1 message Jul 1, 2003

lore
Share & tools
lore
#0 lore raw

I notice that people have been replacing strncpy by strlcpy, introducing bugs in the process.

It is not true that strlcpy is guaranteed to be better than strncpy. Indeed, strlcpy cannot handle character arrays that are not necessarily 0-terminated.