This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] add attribute nonstring
On Tue, 14 Nov 2017, Florian Weimer wrote:
> So this means that we should add the nostring attribute and not the length
> check.
If the name passed is actually longer than this field, is it undefined
behavior or not? If it's not undefined behavior, I think we should avoid
silent truncation (which means a length check, even if the check allows
the possibility of a non-NUL-terminated value ending up in the field,
unless for some reason truncation is always OK and does not affect the
semantics).
--
Joseph S. Myers
joseph@codesourcery.com