summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath2003-01-08 03:26:47 +0000
committerGlenn L McGrath2003-01-08 03:26:47 +0000
commita69fd2ecf6211ed1ce0de659fd7474e89f05d834 (patch)
tree9db2953f9e0d9b0fdc53a7dd24d49709a8c0926a
parente40500f9cb93bb84d6456f72977bce1c47618c99 (diff)
downloadbusybox-a69fd2ecf6211ed1ce0de659fd7474e89f05d834.zip
busybox-a69fd2ecf6211ed1ce0de659fd7474e89f05d834.tar.gz
Patch by Stewart Brodie to terminate the string array correctly
-rw-r--r--debianutils/run_parts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c
index 34e702e..a6ad810 100644
--- a/debianutils/run_parts.c
+++ b/debianutils/run_parts.c
@@ -88,7 +88,6 @@ int run_parts_main(int argc, char **argv)
* Called once for every argument. */
args = xrealloc(args, (argcount + 2) * (sizeof(char *)));
args[argcount++] = optarg;
- args[argcount] = 0;
break;
default:
show_usage();
@@ -101,5 +100,7 @@ int run_parts_main(int argc, char **argv)
}
args[0] = argv[optind];
+ args[argcount] = 0;
+
return(run_parts(args, test_mode));
}