From: Sam James <sam@gentoo.org>
To: Dennis Brendel <dbrendel@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] stdlib: Perform NULL pointer check for the getenv argument
Date: Mon, 12 Jun 2023 22:30:01 +0100 [thread overview]
Message-ID: <87pm60v05r.fsf@gentoo.org> (raw)
In-Reply-To: <29beb41b-76ca-fcbb-50e8-e2ce43985570@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 543 bytes --]
Dennis Brendel via Libc-alpha <libc-alpha@sourceware.org> writes:
> 'name' is just de-referenced without checking for it being non-NULL.
> Passing NULL is not something one should do in the first place, but
> returning NULL seems to be reasonable in that case instead of just
> waiting for the segfault that might or might not be handled.
>
> This adds another barrier for e.g. safety applications.
>
See Carlos' email for why we can't do this, but I'm wondering what the
motivation here was and if we can do something to help with that?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 377 bytes --]
next prev parent reply other threads:[~2023-06-12 21:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 18:04 Dennis Brendel
2023-06-12 21:22 ` Carlos O'Donell
2023-06-13 6:45 ` Dennis Brendel
2023-06-12 21:30 ` Sam James [this message]
2023-06-13 7:01 ` Dennis Brendel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pm60v05r.fsf@gentoo.org \
--to=sam@gentoo.org \
--cc=dbrendel@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).