Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug#426161: zsh: crashes in reverse_menu



Clint Adams wrote:
> On Sat, May 26, 2007 at 10:54:26PM +0200, Jörg Sommer wrote:
> > Hi,
> > 
> > after typing â??vared CFâ?? I've called â??reverse-menu-completeâ?? with M-x and
> > zsh crashes. This also happens in zsh-beta 4.3.4-dev-0+20070516-1 and is
> > not #416970.
> 
> This is because reverse_menu() is trying to dereference minfo.group
> which is NULL.

I suspect that means we shouldn't do that.

Index: Src/Zle/compresult.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compresult.c,v
retrieving revision 1.70
diff -u -r1.70 compresult.c
--- Src/Zle/compresult.c	30 Oct 2006 14:13:39 -0000	1.70
+++ Src/Zle/compresult.c	28 May 2007 12:29:55 -0000
@@ -1227,6 +1227,9 @@
 {
     int was_meta;
 
+    if (minfo.cur == NULL)
+	return 1;
+
     do {
 	if (minfo.cur == (minfo.group)->matches) {
 	    do {

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



Messages sorted by: Reverse Date, Date, Thread, Author