[patch] Error on setenv(..., NULL, ...)
Siddhesh Poyarekar
siddhesh@redhat.com
Wed Mar 11 17:32:00 GMT 2015
On Wed, Mar 11, 2015 at 01:25:46PM -0400, Mike Frysinger wrote:
> if we agree it's undefined behavior, then can't we have fortification turn this
> into a build failure ?
The compiler already warns about the non-null requirement where it can
find it, so making it fail shouldn't be hard. Maybe we could add the
assert as Joseph suggests for FORTIFY_SOURCE. I am not convinced that
it would be conservative enough to do fail catastrophically in the
default case, hence my suggestion to return a blank string instead of
the bad value.
Siddhesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150311/df7dcfc2/attachment.sig>
More information about the Libc-alpha
mailing list