Download raw body.
setenv(3) segfaults when value == NULL
enh <enh@google.com> wrote:
> might be worth filing an austin group bug, since their ERRORS section
> only mentions name:
> https://pubs.opengroup.org/onlinepubs/9799919799/functions/setenv.html
>
> (leaving it unclear just how an implementation can "copy" a null
> string... that strlen() being the point at which all the
> implementations i just checked currently crash :-) )
>
> On Fri, Mar 13, 2026 at 4:45 PM Lyndon Nerenberg (VE7TFX/VE6BBM)
> <lyndon@orthanc.ca> wrote:
> >
> > Calling setenv(3) as setenv("foo", NULL, 1) will SEGV. This
> > should return EINVAL as with setenv(NULL, "foo", 1).
Furthermore I disagree with this trend to "always return an error
vaue".
An example is fclose(NULL).
That crashes. It *SHOULD* crash, so that you can find and fix the bug.
setenv(3) segfaults when value == NULL