mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 18:20:07 +01:00
typo in libedit fixed - possible buffer overflow - bug#4696
This commit is contained in:
parent
62722e7b05
commit
4f57cee99f
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue