mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-29 03:45:43 +00:00
Fixed NULL pointer dereference in ext/standard/tests/strings/setlocale_basic2.php
This commit is contained in:
1 parent
ff162410f0
commit
e0a32353af
1 file changed
+3
-1
@@ -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