Commit 73bfea9d authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  Potential fixes.  Patch up the fact that users often expect argv[]s
  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
parent 4f3de32f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1058,10 +1058,11 @@ apr_status_t mpm_service_start(apr_pool_t *ptemp, int argc,
        }
        
        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)