diff options
author | serg@serg.mylan <> | 2004-08-20 01:34:34 +0200 |
---|---|---|
committer | serg@serg.mylan <> | 2004-08-20 01:34:34 +0200 |
commit | 4f57cee99fec7d8d86b417067032579ff4379254 (patch) | |
tree | 7dd518741dc6a0d0f43f1d7e00234ceae34aacb1 /cmd-line-utils | |
parent | 62722e7b0528a97ef0b5831cb27c1acfd4d5e856 (diff) | |
download | mariadb-git-4f57cee99fec7d8d86b417067032579ff4379254.tar.gz |
typo in libedit fixed - possible buffer overflow - bug#4696
Diffstat (limited to 'cmd-line-utils')
-rw-r--r-- | cmd-line-utils/libedit/history.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-line-utils/libedit/history.c b/cmd-line-utils/libedit/history.c index 90d94e7fc18..457c8f4a768 100644 --- a/cmd-line-utils/libedit/history.c +++ b/cmd-line-utils/libedit/history.c @@ -649,7 +649,7 @@ history_save(History *h, const char *fname) retval = HPREV(h, &ev), i++) { len = strlen(ev.str) * 4; if (len >= max_size) { - max_size = (len + 1023) & 1023; + max_size = (len + 1023) & ~1023; ptr = h_realloc(ptr, max_size); } (void) strvis(ptr, ev.str, VIS_WHITE); |