From: Derick Rethans Date: Thu, 18 Apr 2002 22:51:23 +0000 (+0000) Subject: - Gaurd for problems in fault servers (fixes problem with Sambar 5.2) X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~587 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=68ca74c3710a5f2e38ddaa0c3f6631238d03eb60;p=php - Gaurd for problems in fault servers (fixes problem with Sambar 5.2) --- diff --git a/sapi/isapi/php4isapi.c b/sapi/isapi/php4isapi.c index 9f30195345..55127da576 100644 --- a/sapi/isapi/php4isapi.c +++ b/sapi/isapi/php4isapi.c @@ -481,7 +481,7 @@ static void sapi_isapi_register_server_variables2(char **server_variables, LPEXT recorded_values[p-server_variables] = estrndup(static_variable_buf, variable_len); } } else if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) { - variable_buf = (char *) emalloc(variable_len); + variable_buf = (char *) emalloc(variable_len+1); if (lpECB->GetServerVariable(lpECB->ConnID, *p, variable_buf, &variable_len) && variable_buf[0]) { php_register_variable(*p, variable_buf, track_vars_array TSRMLS_CC);