about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2008-10-12 19:28:10 +0000
committerClint Adams <clint@users.sourceforge.net>2008-10-12 19:28:10 +0000
commit430e54ddc496b2610ef4ee263f557953cf057db2 (patch)
tree1f48f38f2baa846fbd015dd0c0b0bb08dae26bf9 /Src
parentf444818f2049197c6df62a92ee3f367613cedbbe (diff)
downloadzsh-430e54ddc496b2610ef4ee263f557953cf057db2.tar.gz
zsh-430e54ddc496b2610ef4ee263f557953cf057db2.tar.xz
zsh-430e54ddc496b2610ef4ee263f557953cf057db2.zip
25860: avoid possible NULL dereferencing in bld_parts.
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/compmatch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c
index 836dcdd45..f92caa7bf 100644
--- a/Src/Zle/compmatch.c
+++ b/Src/Zle/compmatch.c
@@ -1553,7 +1553,8 @@ bld_parts(char *str, int len, int plen, Cline *lp, Cline *lprem)
 	*lprem = NULL;
     }
 
-    n->next = NULL;
+    if (n)
+        n->next = NULL;
 
     if (lp)
 	*lp = n;