Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 36399 invoked by uid 500); 15 Jan 2002 16:49:23 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 36376 invoked from network); 15 Jan 2002 16:49:23 -0000 Message-ID: <3C445CF4.A10FF8DD@us.ibm.com> Date: Tue, 15 Jan 2002 09:46:44 -0700 From: David McCreedy X-Mailer: Mozilla 4.72 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: dev@httpd.apache.org Subject: [PATCH] TPF argument fix in src/os/tpf/os.c Content-Type: multipart/mixed; boundary="------------1D1B54ED3013719F8C4FD671" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. --------------1D1B54ED3013719F8C4FD671 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit This patch fixes my previous change for argument passing, put in place 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). -David McCreedy McCreedy@us.ibm.com --------------1D1B54ED3013719F8C4FD671 Content-Type: text/plain; charset=us-ascii; name="diffoutputfile" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffoutputfile" diff -ru3 before/src/os/tpf/os.c after/src/os/tpf/os.c --- before/src/os/tpf/os.c Mon Jan 14 18:46:47 2002 +++ after/src/os/tpf/os.c Mon Jan 14 18:47:46 2002 @@ -273,11 +273,11 @@ /* 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, --------------1D1B54ED3013719F8C4FD671--