mirror of
https://github.com/php/php-src.git
synced 2026-04-27 01:48:26 +02:00
Fixed bug #80958
Missing check after zval_try_get_string(). Closes GH-6871.
This commit is contained in:
@@ -4637,9 +4637,13 @@ static zend_string *try_setlocale_str(zend_long cat, zend_string *loc) {
|
||||
}
|
||||
|
||||
static zend_string *try_setlocale_zval(zend_long cat, zval *loc_zv) {
|
||||
zend_string *loc_str = zval_try_get_string(loc_zv);
|
||||
zend_string *tmp_loc_str;
|
||||
zend_string *loc_str = zval_try_get_tmp_string(loc_zv, &tmp_loc_str);
|
||||
if (UNEXPECTED(loc_str == NULL)) {
|
||||
return NULL;
|
||||
}
|
||||
zend_string *result = try_setlocale_str(cat, loc_str);
|
||||
zend_string_release_ex(loc_str, 0);
|
||||
zend_tmp_string_release(tmp_loc_str);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user