diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2005-07-12 03:07:22 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2005-07-12 03:07:22 +0000 |
commit | 5af2ab3b9cbf701555b58641d251b24ac253de6a (patch) | |
tree | 4f3927b17204eab9218ae9e54c51fd0abb8eb94e | |
parent | a18270da295568cae6f7a0689e28638d03867529 (diff) | |
download | zsh-5af2ab3b9cbf701555b58641d251b24ac253de6a.tar.gz zsh-5af2ab3b9cbf701555b58641d251b24ac253de6a.tar.xz zsh-5af2ab3b9cbf701555b58641d251b24ac253de6a.zip |
21428: Travis: fix crash on bad compvalues call
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/Zle/computil.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 0f8402780..d6c82887e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ * unposted: Completion/Unix/Command/_ruby: fix typo in first normal arg action +2005-07-11 Bart Schaefer <schaefer@zsh.org> + + * 21428: Travis Spencer: Src/Zle/computil.c: fix null pointer deref + on wrong number of arguments to compvalues. + 2005-07-10 Bart Schaefer <schaefer@zsh.org> * 21423: Travis Spencer: Completion/Unix/Command/_unexpand: diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c index aa62cc78b..e56972cee 100644 --- a/Src/Zle/computil.c +++ b/Src/Zle/computil.c @@ -2660,7 +2660,8 @@ parse_cvdef(char *nam, char **args) char **oargs = args, sep = '\0', asep = '=', *name, *descr, *p, *q, **xor, c; int xnum, multi, vtype, hassep = 0, words = 0; - while (args[0][0] == '-' && + while (args && args[0] && args[1] && + args[0][0] == '-' && (args[0][1] == 's' || args[0][1] == 'S' || args[0][1] == 'w') && !args[0][2]) { |