Ushering out strlcpy()
Ushering out strlcpy()
Posted Aug 30, 2022 14:58 UTC (Tue) by NYKevin (subscriber, #129325)In reply to: Ushering out strlcpy() by milesrout
Parent article: Ushering out strlcpy()
IMHO it is not totally unreasonable to expect strncpy(src) to be equivalent to snprintf("%s", size, src), because strcpy(src) is actually equivalent to sprintf("%s", src).
(Incidentally, snprintf is just about the only portable function that DTRT in this context.)
