BUG: 'glabel label' name's lenght, is truncated without err/warn
Ed Schouten
ed at 80386.nl
Tue Nov 8 15:41:18 UTC 2011
Hi Andrew,
* Andrew Duane <aduane at juniper.net>, 20111108 16:22:
> Checking the return code of strlcpy won't say if the entire string fit
> (exactly) correctly, or if it was truncated.
It seems they do:
RETURN VALUES
The strlcpy() and strlcat() functions return the total length of the
string they tried to create. For strlcpy() that means the length of src.
For strlcat() that means the initial length of dst plus the length of
src. While this may seem somewhat confusing, it was done to make trunca‐
tion detection simple.
--
Ed Schouten <ed at 80386.nl>
WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20111108/b2639845/attachment.pgp
More information about the freebsd-hackers
mailing list