summaryrefslogtreecommitdiff
path: root/cmd-line-utils
diff options
context:
space:
mode:
authorunknown <vva@eagle.mysql.r18.ru>2004-08-25 00:26:53 +0500
committerunknown <vva@eagle.mysql.r18.ru>2004-08-25 00:26:53 +0500
commitc2d207e8b0c8837294153cf00c6fdcb442dc43b3 (patch)
tree72c8d3cf4f5f3dab4a2c849ae07934dc478427fa /cmd-line-utils
parent99538ee3aff30c62129e7ad6d4b976d354632ce2 (diff)
downloadmariadb-git-c2d207e8b0c8837294153cf00c6fdcb442dc43b3.tar.gz
resurrect fix for
Bug #4696 segfault in cmd-line-utils/libedit/history.c:history_save() (bundled libedit)
Diffstat (limited to 'cmd-line-utils')
-rw-r--r--cmd-line-utils/libedit/history.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-line-utils/libedit/history.c b/cmd-line-utils/libedit/history.c
index ad47a5572e4..0294734b9a3 100644
--- a/cmd-line-utils/libedit/history.c
+++ b/cmd-line-utils/libedit/history.c
@@ -731,7 +731,7 @@ history_save(History *h, const char *fname)
len = strlen(ev.str) * 4 + 1;
if (len >= max_size) {
char *nptr;
- max_size = (len + 1023) & 1023;
+ max_size = (len + 1023) & ~1023;
nptr = h_realloc(ptr, max_size);
if (nptr == NULL) {
i = -1;