mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
typo in libedit fixed - possible buffer overflow - bug#4696
This commit is contained in:
parent
04c3915343
commit
5b85dca572
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++) {
|
retval = HPREV(h, &ev), i++) {
|
||||||
len = strlen(ev.str) * 4;
|
len = strlen(ev.str) * 4;
|
||||||
if (len >= max_size) {
|
if (len >= max_size) {
|
||||||
max_size = (len + 1023) & 1023;
|
max_size = (len + 1023) & ~1023;
|
||||||
ptr = h_realloc(ptr, max_size);
|
ptr = h_realloc(ptr, max_size);
|
||||||
}
|
}
|
||||||
(void) strvis(ptr, ev.str, VIS_WHITE);
|
(void) strvis(ptr, ev.str, VIS_WHITE);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue