diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2005-06-17 08:37:46 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2005-06-17 08:37:46 +0000 |
commit | 14bfaab3efce9e76bfe589a4a6c000bffe6e1f1b (patch) | |
tree | 28430ca7ced95ad3d643c3206b1662e655d711b8 /Src | |
parent | 2a176ec84ed588b10ff427901011826ea4712f23 (diff) | |
download | zsh-14bfaab3efce9e76bfe589a4a6c000bffe6e1f1b.tar.gz zsh-14bfaab3efce9e76bfe589a4a6c000bffe6e1f1b.tar.xz zsh-14bfaab3efce9e76bfe589a4a6c000bffe6e1f1b.zip |
21352: Harald van Dijk: handle null after % in printf format specifier
Diffstat (limited to 'Src')
-rw-r--r-- | Src/builtin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index 6bec738f4..48e836996 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -3653,7 +3653,7 @@ bin_print(char *name, char **args, Options ops, int func) /* copy only one of each flag as spec has finite size */ memset(flags, 0, sizeof(flags)); - while ((flag = strchr(flagch, *c))) { + while (*c && (flag = strchr(flagch, *c))) { if (!flags[flag - flagch]) { flags[flag - flagch] = 1; *d++ = *c; |