to be NULL terminated, even though argc should clearly limit the array.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95525
13f79535-47bb-0310-9956-
ffa450edef68
}
argc += 1;
- start_argv = malloc(argc * sizeof(const char **));
+ start_argv = malloc((argc + 1) * sizeof(const char **));
start_argv[0] = mpm_service_name;
if (argc > 1)
memcpy(start_argv + 1, argv, (argc - 1) * sizeof(const char **));
-
+ start_argv[argc] = NULL;
+
rv = APR_EINIT;
if (StartService(schService, argc, start_argv)
&& signal_service_transition(schService, 0, /* test only */