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

PATCH: possible NULL dereference in bld_parts



CID 26.

Index: Src/Zle/compmatch.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compmatch.c,v
retrieving revision 1.58
diff -u -r1.58 compmatch.c
--- Src/Zle/compmatch.c	10 Sep 2008 18:33:32 -0000	1.58
+++ Src/Zle/compmatch.c	12 Oct 2008 19:21:52 -0000
@@ -1553,7 +1553,8 @@
 	*lprem = NULL;
     }
 
-    n->next = NULL;
+    if (n)
+        n->next = NULL;
 
     if (lp)
 	*lp = n;



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