about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2004-01-20 10:55:24 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2004-01-20 10:55:24 +0000
commit0167f8d036eebbb262ce78f6fd594ebacea8fa6c (patch)
tree67afa8fc301d4c745ad5aca78cfe7d19074ffb14 /Src
parent23c7ca433518aacb39857db142dada45b5117400 (diff)
downloadzsh-0167f8d036eebbb262ce78f6fd594ebacea8fa6c.tar.gz
zsh-0167f8d036eebbb262ce78f6fd594ebacea8fa6c.tar.xz
zsh-0167f8d036eebbb262ce78f6fd594ebacea8fa6c.zip
19385: NULL dereference in add_match_part
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/compmatch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c
index 74b2725eb..b99db2e6e 100644
--- a/Src/Zle/compmatch.c
+++ b/Src/Zle/compmatch.c
@@ -341,7 +341,7 @@ add_match_part(Cmatcher m, char *l, char *w, int wl,
 
     /* If the anchors are equal, we keep only one. */
 
-    if (!strncmp(l, w, wl))
+    if (l && !strncmp(l, w, wl))
 	l = NULL;
 
     /* Split the new part into parts and turn the last one into a