From 3d3b5c521157079d57ff203af35869cf166c6865 Mon Sep 17 00:00:00 2001 From: pancake Date: Mon, 25 Jan 2016 17:20:45 +0100 Subject: [PATCH] Fix one byte overflow in r2pipe.c --- libr/socket/r2pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libr/socket/r2pipe.c b/libr/socket/r2pipe.c index e58b7d6b62..9e6a411de9 100644 --- a/libr/socket/r2pipe.c +++ b/libr/socket/r2pipe.c @@ -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;