This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [COMMITTED] [PATCH] posix: Fix posix_spawn invalid memory access
- From: Andreas Schwab <schwab at suse dot de>
- To: Florian Weimer <fw at deneb dot enyo dot de>
- Cc: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, libc-alpha at sourceware dot org
- Date: Mon, 21 Mar 2016 15:10:11 +0100
- Subject: Re: [COMMITTED] [PATCH] posix: Fix posix_spawn invalid memory access
- Authentication-results: sourceware.org; auth=none
- References: <1458508785-31315-1-git-send-email-adhemerval dot zanella at linaro dot com> <874mc0aqd6 dot fsf at mid dot deneb dot enyo dot de>
Florian Weimer <fw@deneb.enyo.de> writes:
> * Adhemerval Zanella:
>
>> - if (!ec && new_pid)
>> + if (!ec && pid)
>
> I think the general convention is not to perform implicit NULL checks,
> so it should be âpid != NULLâ.
For the same reason "!ec" should be changed to "ec == 0".
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."