mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fix copying too much leading to potential segfault
This commit is contained in:
parent
80a851b4dd
commit
c44efbbbb1
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue