mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-03 02:41:08 +00:00
Fix one byte overflow in r2pipe.c
This commit is contained in:
parent
79cc7c9958
commit
3d3b5c5211
@ -200,7 +200,7 @@ R_API int r2p_write(R2Pipe *r2p, const char *str) {
|
||||
if (!r2p || !str)
|
||||
return -1;
|
||||
len = strlen (str) + 1; /* include \x00 */
|
||||
cmd = malloc (len + 1);
|
||||
cmd = malloc (len + 2);
|
||||
memcpy (cmd, str, len);
|
||||
cmd[len++] = '\n';
|
||||
cmd[len] = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user