From: Bill Stoddard Date: Tue, 18 Dec 2001 21:56:16 +0000 (+0000) Subject: Win32: Fix bug that could cause CGI scripts with QUERY_STRINGS X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=949a7d2fd42c1b681906f5d724f78bec8a3008a5;p=apache Win32: Fix bug that could cause CGI scripts with QUERY_STRINGS to fail. Gotta allocate enough space for that NULL string terminator :-) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92522 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index ce47b5dbe8..3763ae1989 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,6 @@ Changes with Apache 2.0.30-dev + *) Win32: Fix bug that could cause CGI scripts with QUERY_STRINGS + to fail. [Bill Stoddard] *) Change core code to allow an MPM to set hard thread/server limits at startup. [Jeff Trawick] diff --git a/modules/arch/win32/mod_win32.c b/modules/arch/win32/mod_win32.c index 52de6f9501..503f5daddf 100644 --- a/modules/arch/win32/mod_win32.c +++ b/modules/arch/win32/mod_win32.c @@ -284,7 +284,7 @@ static apr_array_header_t *split_argv(apr_pool_t *p, const char *interp, const char *cgiprg, const char *cgiargs) { apr_array_header_t *args = apr_array_make(p, 8, sizeof(char*)); - char *d = apr_palloc(p, strlen(interp)); + char *d = apr_palloc(p, strlen(interp)+1); const char *ch = interp; const char **arg; int prgtaken = 0;