From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: Completion problem on right hand side of assignment.
Date: Mon, 3 May 1999 11:18:45 +0200 (MET DST) [thread overview]
Message-ID: <199905030918.LAA28922@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Tanaka Akira's message of 03 May 1999 01:46:18 +0900
Tanaka Akira wrote:
> ...
> rascal% A=Doc/Zsh/zsh: segmentation fault (core dumped) ./Src/zsh -f
> Z:akr@rascal%
> ...
> BUG: attempt to free already free storage
> BUG: attempt to free storage at invalid address
Seems like clwnum is off-by-one after parsing an assignment. This
caused compwords to be allocated one field too short in callcompfunc
and then the NULL pointer terminating it could be overwritten.
This should fix it.
Bye
Sven
diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c Mon May 3 11:07:15 1999
+++ Src/Zle/zle_tricky.c Mon May 3 11:07:50 1999
@@ -4360,7 +4360,7 @@
PERMALLOC {
q = compwords = (char **)
- zalloc((clwnum - aadd + 1) * sizeof(char *));
+ zalloc((clwnum + 1) * sizeof(char *));
for (p = clwords + aadd; *p; p++, q++) {
tmp = dupstring(*p);
untokenize(tmp);
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~1999-05-03 9:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-05-03 9:18 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-05-02 16:46 Tanaka Akira
1999-05-02 19:35 ` Bart Schaefer
1999-05-03 3:46 ` Tanaka Akira
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=199905030918.LAA28922@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.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).