This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] Error on setenv(..., NULL, ...)
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: Joseph Myers <joseph at codesourcery dot com>, GLIBC Devel <libc-alpha at sourceware dot org>, Roland McGrath <roland at hack dot frob dot com>, "mtk at man7 dot org" <mtk at man7 dot org>
- Date: Wed, 11 Mar 2015 18:36:20 +0000
- Subject: Re: [patch] Error on setenv(..., NULL, ...)
- Authentication-results: sourceware.org; auth=none
- References: <CALoOobNSbWUkd_i-L6U0ovbqPYnJY-h=ftX1K61yb19pmJj6aw at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1503111712240 dot 30954 at digraph dot polyomino dot org dot uk> <CALoOobPKxfJfnbcUKH8osgCZMeSiD83K1OiF+_vSeAy0ewe1Jw at mail dot gmail dot com> <55008721 dot 1090200 at arm dot com> <CALoOobNbOgm5=oFbEUmTbca3M-KqSUgGmTeWYOt1zTN-CTLoog at mail dot gmail dot com>
On 11/03/15 18:26, Paul Pluzhnikov wrote:
> On Wed, Mar 11, 2015 at 11:19 AM, Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
>
>>> 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
>
> Where does it say that NULL name is allowed?
>
> [EINVAL]
> The envname argument points to an empty string or points to a string
> containing an '=' character.
>
ah sorry i havent read it just posted the link, this seems to be
a change in posix 2013
here is the 2004 version:
http://pubs.opengroup.org/onlinepubs/009695399/functions/setenv.html
(i dont see the change in the change history which i think is
an editing bug in posix, 2008 had the 0 too, but it's no longer
available online only the updated 2013 version
anyway i think 0 name should be handled in the future because
applications depend on it)
- References:
- [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)