mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
- No need for extra strlen() call here
This commit is contained in:
parent
754d011d8d
commit
1b716123f2
@ -382,7 +382,7 @@ static unsigned int php_sapi_filter(int arg, char *var, char **val, unsigned int
|
||||
}
|
||||
efree(*val);
|
||||
if (Z_STRLEN(new_var)) {
|
||||
*val = estrdup(Z_STRVAL(new_var));
|
||||
*val = estrndup(Z_STRVAL(new_var), Z_STRLEN(new_var) + 1);
|
||||
zval_dtor(&new_var);
|
||||
} else {
|
||||
*val = estrdup("");
|
||||
|
Loading…
Reference in New Issue
Block a user