zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: crash completing after ~[]
@ 2008-09-29 17:34 Peter Stephenson
  2008-09-29 20:40 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Stephenson @ 2008-09-29 17:34 UTC (permalink / raw)
  To: Zsh hackers list

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-29 20:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-29 17:34 PATCH: crash completing after ~[] Peter Stephenson
2008-09-29 20:40 ` Peter Stephenson

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).