1
0
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:
Peter Stephenson 2004-01-20 10:55:24 +00:00
parent 23c7ca4335
commit 0167f8d036
2 changed files with 6 additions and 1 deletions

@ -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> 2004-01-19 Peter Stephenson <pws@csr.com>
* Vincent Stemen <zsh@hightek.org>: users/7011: * 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 the anchors are equal, we keep only one. */
if (!strncmp(l, w, wl)) if (l && !strncmp(l, w, wl))
l = NULL; l = NULL;
/* Split the new part into parts and turn the last one into a /* Split the new part into parts and turn the last one into a