[PATCH] add attribute nonstring

Joseph Myers joseph@codesourcery.com
Tue Nov 14 17:06:00 GMT 2017


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



More information about the Libc-alpha mailing list