From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: PATCH: crash completing after ~[]
Date: Mon, 29 Sep 2008 18:34:27 +0100 [thread overview]
Message-ID: <11725.1222709667@csr.com> (raw)
I got the shell to crash when completing (actually an attempted
expansion) after "echo ~[]". Apart from the suggestive command line,
this is actually unrelated to dynamic named directories. The expansion
not surprising doesn't succeed anyway, so I haven't worried too much
(or at all) about what the shell code is doing that provokes this; it
appears to be an invalid pattern in a search through an associative
array, which is indeed not properly handled at this point.
Index: Src/params.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/params.c,v
retrieving revision 1.146
diff -u -r1.146 params.c
--- Src/params.c 13 Sep 2008 08:19:19 -0000 1.146
+++ Src/params.c 29 Sep 2008 17:29:49 -0000
@@ -1302,6 +1302,8 @@
if (v->isarr) {
if (ishash) {
+ if (!pprog)
+ return 1;
scanprog = pprog;
scanstr = s;
if (keymatch)
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
next reply other threads:[~2008-09-29 17:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-29 17:34 Peter Stephenson [this message]
2008-09-29 20:40 ` 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=11725.1222709667@csr.com \
--to=pws@csr.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).