app/test: fix buffer overflow
[dpdk.git] / app / test / commands.c
index 9cb9606..e0af8e4 100644 (file)
@@ -439,7 +439,7 @@ int commands_init(void)
                commands_len += strlen(t->command) + 1;
        }
 
-       commands = malloc(commands_len);
+       commands = malloc(commands_len + 1);
        if (!commands)
                return -1;