]> granicus.if.org Git - apache/commitdiff
mod_ext_filter: Fix a problem building argument lists which
authorJeff Trawick <trawick@apache.org>
Mon, 13 Jan 2003 19:35:55 +0000 (19:35 +0000)
committerJeff Trawick <trawick@apache.org>
Mon, 13 Jan 2003 19:35:55 +0000 (19:35 +0000)
occasionally caused exec to fail.

The argument array passed to apr_proc_create() needs to have
a NULL entry at the end.

PR: 15491

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98258 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/filters/mod_ext_filter.c

diff --git a/CHANGES b/CHANGES
index 263f062af243dbdb39de42dfdbb78eadfc9fa87e..cdc5e42904702591aee3af9632a7c2fce102d4a4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) mod_ext_filter: Fix a problem building argument lists which 
+     occasionally caused exec to fail.  PR 15491.  [Jeff Trawick]
+
   *) Add mod_dav_lock - a generic subset of the DAV locking implementation.
      [Justin Erenkrantz]
 
index 31c773672dac0193260ebf598e203e7e47f40798..9734446c7e6089eb01fb5cdc86513f68757f2a41 100644 (file)
@@ -222,9 +222,10 @@ static const char *parse_cmd(apr_pool_t *p, const char **args, ef_filter_t *filt
     else
     {
         /* simple path */
-        /* Allocate space for one argv pointer and parse the args. */
-        filter->args = (char **)apr_palloc(p, sizeof(char *));
+        /* Allocate space for two argv pointers and parse the args. */
+        filter->args = (char **)apr_palloc(p, 2 * sizeof(char *));
         filter->args[0] = ap_getword_white(p, args);
+        filter->args[1] = NULL; /* end of args */
     }
     if (!filter->args[0]) {
         return "Invalid cmd= parameter";