iliaa Thu Jun 19 12:10:37 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard file.c Log: Fixed a possible crash in parse_context_options() Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.279.2.25 php4/ext/standard/file.c:1.279.2.26 --- php4/ext/standard/file.c:1.279.2.25 Fri Jun 6 04:11:38 2003 +++ php4/ext/standard/file.c Thu Jun 19 12:10:37 2003 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.279.2.25 2003/06/06 08:11:38 sniper Exp $ */ +/* $Id: file.c,v 1.279.2.26 2003/06/19 16:10:37 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -877,16 +877,17 @@ char *wkey, *okey; int wkey_len, okey_len; int ret = SUCCESS; + ulong num_key; zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(options), &pos); while (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_P(options), (void**)&wval, &pos)) { - if (HASH_KEY_IS_STRING == zend_hash_get_current_key_ex(Z_ARRVAL_P(options), &wkey, &wkey_len, NULL, 0, &pos) + if (HASH_KEY_IS_STRING == zend_hash_get_current_key_ex(Z_ARRVAL_P(options), &wkey, &wkey_len, &num_key, 0, &pos) && Z_TYPE_PP(wval) == IS_ARRAY) { zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(wval), &opos); while (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_PP(wval), (void**)&oval, &opos)) { - if (HASH_KEY_IS_STRING == zend_hash_get_current_key_ex(Z_ARRVAL_PP(wval), &okey, &okey_len, NULL, 0, &opos)) { + if (HASH_KEY_IS_STRING == zend_hash_get_current_key_ex(Z_ARRVAL_PP(wval), &okey, &okey_len, &num_key, 0, &opos)) { ZVAL_ADDREF(*oval); php_stream_context_set_option(context, wkey, okey, *oval); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php