diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2000-08-14 16:54:04 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2000-08-14 16:54:04 +0000 |
commit | 7a38b670a7e5294b26192ed6505bcd8e8778fb49 (patch) | |
tree | dd288816da3c7ebe7f1c4357adce20cdb4605aa8 | |
parent | ba14d4e1ee881a521b50fbd056bf9fb0fe1e2b60 (diff) | |
download | zsh-7a38b670a7e5294b26192ed6505bcd8e8778fb49.tar.gz zsh-7a38b670a7e5294b26192ed6505bcd8e8778fb49.tar.xz zsh-7a38b670a7e5294b26192ed6505bcd8e8778fb49.zip |
12621: Avoid bad free.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Src/Zle/zle_main.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 97b1f3be0..39f8ef7ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2000-08-14 Bart Schaefer <schaefer@zsh.org> + * 12621: Src/Zle/zle_main.c: Use ztrdup() on a string that will + later be freed; this appears to have been a bug ever since 9839. + * Andrej: 12620: configure.in, Src/system.h: Fix cache variable test for mmap, remove cygwin special-case. diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index 73c402490..f02b2b75d 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -877,6 +877,8 @@ bin_vared(char *name, char **args, char *ops, int func) } else if (*s) { zwarnnam(name, "invalid parameter name: %s", args[0], 0); return 1; + } else { + s = ztrdup(s); } if (SHTTY == -1) { |