mirror of
https://github.com/php/php-src.git
synced 2025-01-11 05:24:49 +08:00
snprintf patch
This commit is contained in:
parent
3bd2a64165
commit
f8b7d0e046
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user