mirror of
https://github.com/php/php-src.git
synced 2024-11-25 10:54:15 +08:00
Fix copying too much leading to potential segfault
This commit is contained in:
parent
80a851b4dd
commit
c44efbbbb1
@ -616,7 +616,7 @@ int phpdbg_compile(void) /* {{{ */
|
||||
memmove(data->line + 1, data->line, sizeof(uint) * data->lines);
|
||||
data->line[0] = 0;
|
||||
data->buf = erealloc(data->buf, data->len + start_line_len);
|
||||
memmove(data->buf + start_line_len, data->buf, data->len * sizeof(uint));
|
||||
memmove(data->buf + start_line_len, data->buf, data->len);
|
||||
memcpy(data->buf, start_line, start_line_len);
|
||||
efree(start_line);
|
||||
data->len += start_line_len;
|
||||
|
Loading…
Reference in New Issue
Block a user