Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] jp: fix segfaults during parameter expansion
- X-seq: zsh-workers 42270
- From: Joey Pabalinas <joeypabalinas@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: [PATCH] jp: fix segfaults during parameter expansion
- Date: Sun, 14 Jan 2018 04:01:34 -1000
- Cc: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>, Joey Pabalinas <joeypabalinas@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+0rOHZFQeSOgLvw5ByZdRKCeHTzkneqQiIR0DemOH8I=; b=qa3HiC5HNpGOM77KiC27aSCv3tC4Z2WVbd1SQUMVWftqFYcVBfZ34ZO8lK5ltfTEQl EsuAgyrM1JQupZ9DyW7+1BqRVcd3eepN5SHA16WtyrIPnHQDCavprzCsPGaU1bxQzMNy 7eIenI83KulMLR9qt/WioLqMGFOoc6SWLrt5yIwWKWh+QOuLLJxyBE0x0VyWgFfvPEP7 2CY/WfDbxBI4Tk1JjxnTUcfVme5sW7ahuby1rq5wo+7Iauzq2dwAeIxRQp9h1RnmdDgY GWa9vCUbUlNb266JLa2PFueKytT9ZPw23jjYjNOtn75JMjltT41GRQvrXKHbHg+BxT/I CzaQ==
- In-reply-to: <CAH+w=7bMF_Kzvme+5EVazsa2KKEHO2uh2-u_T0MSAx2H=zcXQg@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20180114060557.hmrvpg6t4rdebgv6@gmail.com> <CAH+w=7bMF_Kzvme+5EVazsa2KKEHO2uh2-u_T0MSAx2H=zcXQg@mail.gmail.com>
On Sun, Jan 14, 2018 at 04:06:09AM -0800, Bart Schaefer wrote:
>
> Thanks for tracking this down. Defensive programming is always good,
> but I think this is indicative of a problem further upstream.
>
> What's the expected output of that substitution?
No problem; to be quite honestly I don't think there is on, haha.
Okdana on irc pointed it out, and I just tracked it down cause
tracking down stuff like this is something I enjoy. When I found the
NULL dereferences it made me wonder "wtf is going on here anyway???" so
I asked:
> 20:30 <jp> also how in the fuck did you even find this
> 20:30 <jp> this is like something a fuzzer would pop out
> 20:30 <okdana> lol
> 20:31 <okdana> i was trying to assign a value to an association element
> through indirection
> 20:31 <okdana> the AA is nonsense because a single element can't have an
> array/association assigned to it obv
> 20:32 <okdana> i was just adding and removing stuff randomly to see what
> would work
so yeah :) Honestly, I mostly just wasn't comfortable with paramater
expansion segfaulting, heh.
On Sun, Jan 14, 2018 at 04:06:09AM -0800, Bart Schaefer wrote:
>
> The following prevents the segfault for me, instead giving the error
> "zsh: not an identifier: " (i.e., empty string is not a valid
> parameter name). But perhaps there's a different error that should
> occur here if val is NULL?
That actually helped me realize (imo) a simpler solution; working
on a [PATCH v2] right now.
--
Joey Pabalinas
Attachment:
signature.asc
Description: PGP signature
Messages sorted by:
Reverse Date,
Date,
Thread,
Author