mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Handle NULL strings in sapi_cli_server_register_variable().
Fixes bug #68745 (Invalid HTTP requests make web server segfault).
This commit is contained in:
parent
0cc2810498
commit
448ef30f75
3 changed files with 42 additions and 0 deletions
|
@ -708,6 +708,11 @@ static void sapi_cli_server_register_variable(zval *track_vars_array, const char
|
|||
{
|
||||
char *new_val = (char *)val;
|
||||
uint new_val_len;
|
||||
|
||||
if (NULL == val) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (sapi_module.input_filter(PARSE_SERVER, (char*)key, &new_val, strlen(val), &new_val_len TSRMLS_CC)) {
|
||||
php_register_variable_safe((char *)key, new_val, new_val_len, track_vars_array TSRMLS_CC);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue