Fixed NULL pointer dereference in ext/standard/tests/strings/setlocale_basic2.php

This commit is contained in:
Xinchen Hui committed 2014-02-25 12:09:39 +08:00
1 parent ff162410f0
commit e0a32353af
1 file changed
+3 -1
+3 -1
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];
}