]> granicus.if.org Git - apache/commitdiff
Win32: Fix bug that could cause CGI scripts with QUERY_STRINGS
authorBill Stoddard <stoddard@apache.org>
Tue, 18 Dec 2001 21:56:16 +0000 (21:56 +0000)
committerBill Stoddard <stoddard@apache.org>
Tue, 18 Dec 2001 21:56:16 +0000 (21:56 +0000)
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

CHANGES
modules/arch/win32/mod_win32.c

diff --git a/CHANGES b/CHANGES
index ce47b5dbe8becea905298e4a823764b0c49e7e9d..3763ae198919cd21a15032e9b51080b4621a3596 100644 (file)
--- 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]
index 52de6f95011bb8b94a3b8154a5f0f81a05c2d6e2..503f5daddf8e5c7a2fd5018749690694f8b54ef0 100644 (file)
@@ -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;