Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Another minor =~ glitch
- X-seq: zsh-workers 41287
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Another minor =~ glitch
- Date: Wed, 14 Jun 2017 06:45:21 +0200
- Cc: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=PTDSnM1FbdvIOZVoNoWFjCc7wLeFjI3lNpRP23eq/IA=; b=uh5SLXmTUCf/XlzXelU/UHdlNJAiTSYJ4Hq2pDjdTSQo9iJWjOmo4rpvVX+M+UCXcl S6s0MATK2LF+1wc3dwEVZk8+pTGc6qyeDdSBzINMOyt0WN0Cl6wmr2tb43DCv7in06as m4+z3FoeinOL5NcinguyD4hgy5myNWY9dQ9R6VNkd3BL2uiC0SnTPbZH+96HBOJrcZMw /U5sqOarIEuSeRclTHVBCG07y5SBeF5VVBlGVfMs/xAjt2ie8034JUMq3bGpr+8VnLRi 7jPQQDyQDT3EyZlCwHGeL71x3Dj3roe6SPucu5Ak0m0MSEQ8p6tCpaYB5b49W89jBGYg pHmA==
- In-reply-to: <CAH+w=7Yg2spHiw=vCgTHv3k1caW36qtv6az1th3YCHqUD70i8w@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>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <170407103320.ZM27783@torch.brasslantern.com> <2017-04-08_03.58.46@mobil.systemanalysen.net> <CAH+w=7Yg2spHiw=vCgTHv3k1caW36qtv6az1th3YCHqUD70i8w@mail.gmail.com>
On Sat, Apr 8, 2017 at 7:23 AM, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Fri, Apr 7, 2017 at 6:58 PM, Roland Eggner <edvz2@xxxxxxxxxxxxxxxxxx> wrote:
>>
>> Regression observed since my Zsh update
>> from bb6c08b51a079870 to fc1fedda954e1d10.
>
> Thanks, that narrows it down to this:
>
> diff --git a/Src/cond.c b/Src/cond.c
> index 9b739f6..a638412 100644
> --- a/Src/cond.c
> +++ b/Src/cond.c
> @@ -139,9 +139,9 @@ evalcond(Estate state, char *fromtest)
> l = 2;
> }
> if (name && IS_DASH(name[0]))
> - errname = name;
> + untokenize(errname = name);
> else if (strs[0] && IS_DASH(*strs[0]))
> - errname = strs[0];
> + untokenize(errname = strs[0]);
> else
> errname = "<null>";
> if (name && IS_DASH(name[0]) &&
This patch causes segfaults for me (in the first hunk at least)
because name can be a readonly string. Should we ztrdup it?
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author