From 0167f8d036eebbb262ce78f6fd594ebacea8fa6c Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 20 Jan 2004 10:55:24 +0000 Subject: 19385: NULL dereference in add_match_part --- Src/Zle/compmatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Src') 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 -- cgit 1.4.1