]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
This patch fixes my previous change for argument passing, put in place
authorBill Stoddard <stoddard@apache.org>
Tue, 15 Jan 2002 17:27:32 +0000 (17:27 +0000)
committerBill Stoddard <stoddard@apache.org>
Tue, 15 Jan 2002 17:27:32 +0000 (17:27 +0000)
to support rotatelogs. It only affects TPF. I was stupidly displacing past
the end of the "args" array while setting up to fork to rotatelogs (or a CGI).

Submitted by: David McCreedy

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@92856 13f79535-47bb-0310-9956-ffa450edef68

src/os/tpf/os.c

index c951aa6b9f6aa1c391b0a03ed885245dbfe7a974..e8af1031bdd81334e66e45f64325d106502f2158 100644 (file)
@@ -273,11 +273,11 @@ int ap_tpf_spawn_child(pool *p, int (*func) (void *, child_info *),
    /* use a copy of cld->filename because strtok is destructive */
    arguments = ap_pstrdup(p, cld->filename);
    args[0] = strtok(arguments, WHITE);
-   args[MAXARGC + 1] = NULL;
 
    for (i = 0; i < MAXARGC && args[i] ; i++) {
        args[i + 1] = strtok(NULL, WHITE);
    }
+   args[MAXARGC] = NULL;
 
    if ((pid = tpf_fork(&fork_input,
                        (const char **)args,