diff options
| author | Peter Stephenson <pws@users.sourceforge.net> | 2004-01-20 10:55:24 +0000 |
|---|---|---|
| committer | Peter Stephenson <pws@users.sourceforge.net> | 2004-01-20 10:55:24 +0000 |
| commit | 0167f8d036eebbb262ce78f6fd594ebacea8fa6c (patch) | |
| tree | 67afa8fc301d4c745ad5aca78cfe7d19074ffb14 | |
| parent | users/7011: typo in mkbltnmlst.sh (diff) | |
| download | zsh-0167f8d036eebbb262ce78f6fd594ebacea8fa6c.tar zsh-0167f8d036eebbb262ce78f6fd594ebacea8fa6c.tar.gz zsh-0167f8d036eebbb262ce78f6fd594ebacea8fa6c.tar.bz2 zsh-0167f8d036eebbb262ce78f6fd594ebacea8fa6c.tar.lz zsh-0167f8d036eebbb262ce78f6fd594ebacea8fa6c.tar.xz zsh-0167f8d036eebbb262ce78f6fd594ebacea8fa6c.tar.zst zsh-0167f8d036eebbb262ce78f6fd594ebacea8fa6c.zip | |
19385: NULL dereference in add_match_part
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | Src/Zle/compmatch.c | 2 |
2 files changed, 6 insertions, 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> * Vincent Stemen <zsh@hightek.org>: users/7011: 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 |
