From: William A. Rowe Jr Date: Tue, 14 May 2002 13:44:48 +0000 (+0000) Subject: Fix GetServerVariable() to return the buffer consumed, including the X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=070b1d55389132df0af16fa549b1dc99632de543;p=apache Fix GetServerVariable() to return the buffer consumed, including the terminating NULL. Bug: 8934 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95087 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/arch/win32/mod_isapi.c b/modules/arch/win32/mod_isapi.c index c2aeac173b..3ddd8831dd 100644 --- a/modules/arch/win32/mod_isapi.c +++ b/modules/arch/win32/mod_isapi.c @@ -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; }