diff --git a/client/proxmark3.c b/client/proxmark3.c index a7cbcfe5..76909dac 100644 --- a/client/proxmark3.c +++ b/client/proxmark3.c @@ -146,7 +146,7 @@ void main_loop(char *script_cmds_file, char *script_cmd, bool usb_present) { // If there is a script command if (execCommand){ if ((cmd = (char*) malloc(strlen(script_cmd) + 1)) != NULL) { - memset(cmd, 0, strlen(script_cmd)); + memset(cmd, 0, strlen(script_cmd) + 1); strcpy(cmd, script_cmd); printf(PROXPROMPT"%s\n", cmd); }