[patch] Error on setenv(..., NULL, ...)
Szabolcs Nagy
szabolcs.nagy@arm.com
Wed Mar 11 18:19:00 GMT 2015
On 11/03/15 17:40, Paul Pluzhnikov wrote:
> On Wed, Mar 11, 2015 at 10:14 AM, Joseph Myers <joseph@codesourcery.com> wrote:
>
>> So, if it's undefined behavior to pass NULL here, any detection should
>> take the form of an assertion.
>
> Assert would be inconsistent with the other checks: it surely is just as
> undefined to pass a NULL name.
>
that's not undefined, the name can be 0 and then EINVAL must be set.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/setenv.html
More information about the Libc-alpha
mailing list