mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-10-02 08:51:18 +02:00
19385: NULL dereference in add_match_part
This commit is contained in:
parent
23c7ca4335
commit
0167f8d036
@ -1,3 +1,8 @@
|
||||
2004-01-20 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* Bob Schmertz: 19385: Src/compmatch.c: protect against calling
|
||||
add_match_part with NULL pointers.
|
||||
|
||||
2004-01-19 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* Vincent Stemen <zsh@hightek.org>: users/7011:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user