From a69fd2ecf6211ed1ce0de659fd7474e89f05d834 Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Wed, 8 Jan 2003 03:26:47 +0000 Subject: [PATCH] Patch by Stewart Brodie to terminate the string array correctly --- debianutils/run_parts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c index 34e702ef8..a6ad81096 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)); } -- 2.25.1