Merge pull request #59 from reverendhomer/master

run: fix array overflow
This commit is contained in:
Joachim Nilsson
2016-12-30 11:40:11 +01:00
committed by GitHub
+1 -1
View File
@@ -91,7 +91,7 @@ int run(char *cmd)
}
args[i] = NULL;
if (i == NUM_ARGS && args[i]) {
if (i == NUM_ARGS && arg) {
_e("Command too long: %s", cmd);
free(backup);
errno = EOVERFLOW;