strlcpy
Posted Jun 12, 2003 7:12 UTC (Thu) by
bgilbert (subscriber, #4738)
In reply to:
strlcpy by ncm
Parent article:
strlcpy
> Second, if told it has a zero-length buffer, it doesn't even
> null-terminate it, leaving whatever was already present in the
> buffer in place.
If told it has a zero-length buffer, where is it supposed to put the null? Yes, the zero
length
probably indicates a bug of some sort, but you seem to be proposing that the function
should deliberately write past the end of the buffer in this case. That seems rather
counterproductive.
(
Log in to post comments)