diff options
author | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2018-03-24 15:17:37 +0900 |
---|---|---|
committer | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2018-03-24 15:22:10 +0900 |
commit | e4a8069b329cacd6486f831bb55273f8253295b2 (patch) | |
tree | d51fcb821d4111c527a31ede8bcb34371d7cc487 /Src/Zle/zle_thingy.c | |
parent | 4977ec13982bc851668e85924e30a57c4e304b6e (diff) | |
download | zsh-e4a8069b329cacd6486f831bb55273f8253295b2.tar.gz zsh-e4a8069b329cacd6486f831bb55273f8253295b2.tar.xz zsh-e4a8069b329cacd6486f831bb55273f8253295b2.zip |
42501: avoid out of bound pointer (as 42487)
Diffstat (limited to 'Src/Zle/zle_thingy.c')
-rw-r--r-- | Src/Zle/zle_thingy.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c index f7e9829c2..5601c1178 100644 --- a/Src/Zle/zle_thingy.c +++ b/Src/Zle/zle_thingy.c @@ -731,6 +731,7 @@ bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func)) break; } while (*++(*args)) { + char skip_this_arg[2] = "x"; switch (**args) { case 'n': num = args[0][1] ? args[0]+1 : args[1]; @@ -741,7 +742,7 @@ bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func)) return 1; } if (!args[0][1]) - *++args = "" - 1; + *++args = skip_this_arg; saveflag = 1; zmod.mult = atoi(num); zmod.flags |= MOD_MULT; @@ -760,7 +761,7 @@ bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func)) return 1; } if (!args[0][1]) - *++args = "" - 1; + *++args = skip_this_arg; keymap_restore = dupstring(curkeymapname); if (selectkeymap(keymap_tmp, 0)) { if (remetafy) |