From f8b7d0e0463ecdc97630d70201fd2e4e82d223bc Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Mon, 5 Mar 2007 16:28:39 +0000 Subject: [PATCH] snprintf patch --- sapi/nsapi/nsapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sapi/nsapi/nsapi.c b/sapi/nsapi/nsapi.c index 12d91f05298..f7fc144b4cf 100644 --- a/sapi/nsapi/nsapi.c +++ b/sapi/nsapi/nsapi.c @@ -638,7 +638,7 @@ static void sapi_nsapi_register_server_variables(zval *track_vars_array TSRMLS_D nsapi_free(value); } - snprintf(buf, sizeof(buf), "%d", conf_getglobals()->Vport); + snprintf(buf, NS_BUF_SIZE, "%d", conf_getglobals()->Vport); php_register_variable("SERVER_PORT", buf, track_vars_array TSRMLS_CC); php_register_variable("SERVER_NAME", conf_getglobals()->Vserver_hostname, track_vars_array TSRMLS_CC); @@ -691,7 +691,7 @@ static void sapi_nsapi_register_server_variables(zval *track_vars_array TSRMLS_D /* special variables in error mode */ if (rc->http_error) { - snprintf(buf, sizeof(buf), "%d", rc->http_error); + snprintf(buf, NS_BUF_SIZE, "%d", rc->http_error); php_register_variable("ERROR_TYPE", buf, track_vars_array TSRMLS_CC); } }