public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Julian Squires <julian@cipht.net>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Julian Squires via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH] posix: Fix some null deferences in wordexp [BZ #18096]
Date: Sun, 19 Mar 2023 11:19:27 -0230	[thread overview]
Message-ID: <87h6ugx34o.fsf@cipht.net> (raw)
In-Reply-To: <871qlmyu2f.fsf@igel.home> (Andreas Schwab's message of "Sat, 18 Mar 2023 16:10:00 +0100")

[-- Attachment #1: Type: text/plain, Size: 587 bytes --]


Andreas Schwab <schwab@linux-m68k.org> writes:
> On Mär 18 2023, Julian Squires via Libc-alpha wrote:
>> @@ -1813,7 +1813,7 @@ envsubst:
>>  	    goto success;
>>  
>>  	  value = pattern ? __strdup (pattern) : pattern;
>> -	  free_value = 1;
>> +	  free_value = !!pattern;
>
> What does that fix?

The assertion failure mentioned, where seen_hash is set, triggering the
assertion below, where free_value is set but value is NULL:

  if (seen_hash)
    {
      [...]
      if (free_value)
	{
	  assert (value != NULL);
	  free (value);
	}

-- 
Julian Squires

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 857 bytes --]

  reply	other threads:[~2023-03-19 13:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-18 12:59 Julian Squires
2023-03-18 15:10 ` Andreas Schwab
2023-03-19 13:49   ` Julian Squires [this message]
2023-03-19 14:16     ` Andreas Schwab
2023-03-22 16:39 ` [PATCH v2] posix: Fix some crashes " Julian Squires
2023-03-28 13:09   ` Adhemerval Zanella Netto

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=87h6ugx34o.fsf@cipht.net \
    --to=julian@cipht.net \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@linux-m68k.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).