1
0
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:
Xinchen Hui
2014-02-25 12:09:39 +08:00
parent ff162410f0
commit e0a32353af

View File

@@ -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];
}