From 97b39d2a898b1973d8b8d46ae13ae53bea30f4ee Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Mon, 13 Jan 2003 19:35:55 +0000 Subject: [PATCH] mod_ext_filter: Fix a problem building argument lists which 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 | 3 +++ modules/filters/mod_ext_filter.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 263f062af2..cdc5e42904 100644 --- 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] diff --git a/modules/filters/mod_ext_filter.c b/modules/filters/mod_ext_filter.c index 31c773672d..9734446c7e 100644 --- a/modules/filters/mod_ext_filter.c +++ b/modules/filters/mod_ext_filter.c @@ -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"; -- 2.50.1