Off by one?
Posted May 29, 2003 22:21 UTC (Thu) by
raph (guest, #326)
In reply to:
strlcpy() by nas
Parent article:
strlcpy()
I'm pretty sure you have an off-by-one error there - your code can write up to (size+1) bytes of dst, while from the paper it looks like the correct semantics are to write up to size bytes only - so that strlcat(buf, src, sizeof(buf)) is safe.
(
Log in to post comments)