diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2017-01-25 13:00:48 +0100 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2017-01-25 13:00:48 +0100 |
commit | c44efbbbb1a1b32ee3756b270f41c7507ee22e3b (patch) | |
tree | c0b0b11ca52e79cf5e8970687ef11484a47a7f35 /sapi/phpdbg/phpdbg_prompt.c | |
parent | 80a851b4dd622f5825e46a7318bdd80123205b02 (diff) | |
download | php-git-c44efbbbb1a1b32ee3756b270f41c7507ee22e3b.tar.gz |
Fix copying too much leading to potential segfault
Diffstat (limited to 'sapi/phpdbg/phpdbg_prompt.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_prompt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index 7050904c29..0b4e69ca0e 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -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; |