From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: handling of variables
Date: Wed, 2 Feb 2005 03:47:54 +0000 [thread overview]
Message-ID: <1050202034754.ZM10212@candle.brasslantern.com> (raw)
In-Reply-To: <1050201164011.ZM9367@candle.brasslantern.com>
[moved to -workers]
On Feb 1, 4:40pm, Bart Schaefer wrote:
}
} I now think that exec.c:save_params() needs to copy the value returned
} by ecrawstr() before storing it in the restore_p linked list
That should say "remove_p" not "restore_p".
} but I'm not sure what kind of memory to copy it into
Got a chance to look at this again; addlinknode() uses the heap, so it
should be safe to dupstring() here.
And the following does indeed fix the problem.
Index: Src/exec.c
===================================================================
diff -c -r1.23 exec.c
--- Src/exec.c 13 Jan 2005 04:12:14 -0000 1.23
+++ Src/exec.c 2 Feb 2005 03:41:43 -0000
@@ -2554,10 +2554,10 @@
copyparam(tpm, pm, 1);
pm = tpm;
}
- addlinknode(*remove_p, s);
+ addlinknode(*remove_p, dupstring(s));
addlinknode(*restore_p, pm);
} else
- addlinknode(*remove_p, s);
+ addlinknode(*remove_p, dupstring(s));
pc += (WC_ASSIGN_TYPE(ac) == WC_ASSIGN_SCALAR ?
3 : WC_ASSIGN_NUM(ac) + 2);
next parent reply other threads:[~2005-02-02 3:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2005-02-01T12-49-14@devnull.michael-prokop.at>
[not found] ` <200502011410.j11EAA9D029705@news01.csr.com>
[not found] ` <1050201152428.ZM9278@candle.brasslantern.com>
[not found] ` <1050201164011.ZM9367@candle.brasslantern.com>
2005-02-02 3:47 ` Bart Schaefer [this message]
2005-02-02 12:48 ` Peter Stephenson
2005-02-02 15:24 ` Bart Schaefer
2005-02-02 16:58 ` Peter Stephenson
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=1050202034754.ZM10212@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@sunsite.dk \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
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 NNTP newsgroup(s).