X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/04202e7aa76dd9f0628d8245ae01fd224e5fbf17..8ca5586d49825e3a01b7ec58d8ade4d64564d244:/client/proxmark3.c diff --git a/client/proxmark3.c b/client/proxmark3.c index 4b898d54..96f900c7 100644 --- a/client/proxmark3.c +++ b/client/proxmark3.c @@ -91,7 +91,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);