diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2004-02-15 12:55:30 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2004-02-15 12:55:30 +0000 |
commit | 7feb529776649143927eefb7d70e81305327f67b (patch) | |
tree | 6a8d4e58161b7046e351c75402602d5560c6a87e | |
parent | d83af1a97e652d4a5cd14cd49251f626d74c7a57 (diff) | |
download | zsh-7feb529776649143927eefb7d70e81305327f67b.tar.gz zsh-7feb529776649143927eefb7d70e81305327f67b.tar.xz zsh-7feb529776649143927eefb7d70e81305327f67b.zip |
19422: fix crash resulting from passing a long option to compctl
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Src/Zle/compctl.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 38c84f705..8f8c55b42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-02-15 Oliver Kiddle <opk@zsh.org> + + * 19422: Src/Zle/compctl.c: fix crash if given a long option + 2004-02-14 Peter Stephenson <pws@pwstephenson.fsnet.co.uk> * 19420: acconfig.h, aczsh.m4, configure.ac, Makefile.in, diff --git a/Src/Zle/compctl.c b/Src/Zle/compctl.c index 6e8fcb982..247f4c02d 100644 --- a/Src/Zle/compctl.c +++ b/Src/Zle/compctl.c @@ -857,7 +857,7 @@ get_compctl(char *name, char ***av, Compctl cc, int first, int isdef, int cl) } break; default: - if (!first && (**argv == '-' || **argv == '+')) + if (!first && (**argv == '-' || **argv == '+') && !argv[0][1]) (*argv)--, argv--, ready = 1; else { zwarnnam(name, "bad option: -%c", NULL, **argv); |