]> granicus.if.org Git - apache/commitdiff
Fix GetServerVariable() to return the buffer consumed, including the
authorWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 14 May 2002 13:44:48 +0000 (13:44 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 14 May 2002 13:44:48 +0000 (13:44 +0000)
  terminating NULL.

Bug: 8934

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

modules/arch/win32/mod_isapi.c

index c2aeac173b177f88f4ff7a471920499edeacd5cc..3ddd8831dd93184c845f95802473d0c87119ce2d 100644 (file)
@@ -561,7 +561,7 @@ int APR_THREAD_FUNC GetServerVariable (isapi_cid    *cid,
         }
 
         *(((char*)buf_data)++) = '\0';
-        *buf_size = len;
+        *buf_size = len + 1;
         return 1;
     }
     
@@ -594,7 +594,7 @@ int APR_THREAD_FUNC GetServerVariable (isapi_cid    *cid,
             *(((char*)buf_data)++) = '\n';
         }
         *(((char*)buf_data)++) = '\0';
-        *buf_size = len;
+        *buf_size = len + 1;
         return 1;
     }
     
@@ -609,7 +609,7 @@ int APR_THREAD_FUNC GetServerVariable (isapi_cid    *cid,
             return 0;
         }
         strcpy(buf_data, result);
-        *buf_size = len;
+        *buf_size = len + 1;
         return 1;
     }