mirror of
https://github.com/php/php-src.git
synced 2026-04-11 10:03:18 +02:00
Fixed NULL pointer dereference in ext/standard/tests/strings/setlocale_basic2.php
This commit is contained in:
@@ -4331,7 +4331,9 @@ PHP_FUNCTION(setlocale)
|
||||
if (!zend_hash_num_elements(Z_ARRVAL(args[0]))) {
|
||||
break;
|
||||
}
|
||||
plocale = zend_hash_get_current_data(Z_ARRVAL(args[0]));
|
||||
if ((plocale = zend_hash_get_current_data(Z_ARRVAL(args[0]))) == NULL) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
plocale = &args[i];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user