From: Andrei Zmievski Date: Fri, 18 Oct 2002 13:07:50 +0000 (+0000) Subject: @- Fixed an infinite loop in setlocale() when only invalid locale names X-Git-Tag: php-4.3.0pre2~298 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=92d61459c098bd737da26c1214cec11e00b73c7e;p=php @- Fixed an infinite loop in setlocale() when only invalid locale names @ were passed in the array. (patch by Pal Loberg, pallo@initio.no). --- diff --git a/ext/standard/string.c b/ext/standard/string.c index 80d55eec38..ddd0bce2e9 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -3225,7 +3225,7 @@ PHP_FUNCTION(setlocale) } if (Z_TYPE_PP(args[1]) == IS_ARRAY) { - zend_hash_move_forward(Z_ARRVAL_PP(args[1])); + if (zend_hash_move_forward(Z_ARRVAL_PP(args[1])) == FAILURE) break; } else { if (++i >= n_args) break; }