From 50d6e4abc154916cb4cf62f294700181bfc2abbc Mon Sep 17 00:00:00 2001 From: "roel@libnfc.org" Date: Thu, 28 Feb 2013 16:04:21 +0000 Subject: [PATCH] douniwan5788: --- client/proxmark3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/proxmark3.c b/client/proxmark3.c index db37780d..5ac7cd0e 100644 --- a/client/proxmark3.c +++ b/client/proxmark3.c @@ -144,7 +144,7 @@ static void *main_loop(void *targ) { nl = strrchr(script_cmd_buf, '\n'); if (nl) *nl = '\0'; - if ((cmd = (char*) malloc(strlen(script_cmd_buf))) != NULL) + if ((cmd = (char*) malloc(strlen(script_cmd_buf) + 1)) != NULL) { memset(cmd, 0, strlen(script_cmd_buf)); strcpy(cmd, script_cmd_buf); -- 2.39.2