diff options
-rw-r--r-- | lang/php53/Makefile | 3 | ||||
-rw-r--r-- | lang/php53/distinfo | 3 | ||||
-rw-r--r-- | lang/php53/patches/patch-Zend_zend__builtin__functions.c | 29 |
3 files changed, 33 insertions, 2 deletions
diff --git a/lang/php53/Makefile b/lang/php53/Makefile index 374db837e89..0724983caee 100644 --- a/lang/php53/Makefile +++ b/lang/php53/Makefile @@ -1,9 +1,10 @@ -# $NetBSD: Makefile,v 1.17 2011/08/23 22:22:27 taca Exp $ +# $NetBSD: Makefile,v 1.18 2011/10/20 13:32:20 taca Exp $ # # We can't omit PKGNAME here to handle PKG_OPTIONS. # PKGNAME= php-${PHP_BASE_VERS} +PKGREVISION= 1 CATEGORIES= lang HOMEPAGE= http://www.php.net/ diff --git a/lang/php53/distinfo b/lang/php53/distinfo index 5eec312283f..6cf2e40a2d9 100644 --- a/lang/php53/distinfo +++ b/lang/php53/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.24 2011/10/20 12:38:24 taca Exp $ +$NetBSD: distinfo,v 1.25 2011/10/20 13:32:20 taca Exp $ SHA1 (php-5.3.8/php-5.3.8.tar.bz2) = 8f29029e092f262876bfdd2ce56f6867e2b74b85 RMD160 (php-5.3.8/php-5.3.8.tar.bz2) = f18a18e2dfd7ea7885760eec2a05b3c4a15ad9db @@ -6,6 +6,7 @@ Size (php-5.3.8/php-5.3.8.tar.bz2) = 11190060 bytes SHA1 (php-5.3.8/suhosin-patch-5.3.7-0.9.10.patch.gz) = 3c38e873584b8f9e325a813cc9b197a342595099 RMD160 (php-5.3.8/suhosin-patch-5.3.7-0.9.10.patch.gz) = 19f789bf49a5fed2cd88b199fd8ac5d1ffa9bdc8 Size (php-5.3.8/suhosin-patch-5.3.7-0.9.10.patch.gz) = 41175 bytes +SHA1 (patch-Zend_zend__builtin__functions.c) = 635480e508bd8159daa3f6e38c8b8d6c14f89b5b SHA1 (patch-aa) = b0dc6cd0b2103d5858280202506b33322a98496e SHA1 (patch-ab) = d08bb50cf074a6065ef0d1d67a713b7573cb2f5b SHA1 (patch-ac) = 1720f154232241c19d0c6e08a824e33252f1b690 diff --git a/lang/php53/patches/patch-Zend_zend__builtin__functions.c b/lang/php53/patches/patch-Zend_zend__builtin__functions.c new file mode 100644 index 00000000000..8b5089bca1a --- /dev/null +++ b/lang/php53/patches/patch-Zend_zend__builtin__functions.c @@ -0,0 +1,29 @@ +$NetBSD: patch-Zend_zend__builtin__functions.c,v 1.1 2011/10/20 13:32:20 taca Exp $ + +* Fix for 2011-3379 from r317183 from PHP's repository. + +--- Zend/zend_builtin_functions.c.orig 2011-08-08 14:54:50.000000000 +0000 ++++ Zend/zend_builtin_functions.c +@@ -816,13 +816,19 @@ static void is_a_impl(INTERNAL_FUNCTION_ + int class_name_len; + zend_class_entry *instance_ce; + zend_class_entry **ce; ++ zend_bool allow_string = only_subclass; + zend_bool retval; + +- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zs", &obj, &class_name, &class_name_len) == FAILURE) { ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zs|b", &obj, &class_name, &class_name_len, &allow_string) == FAILURE) { + return; + } +- +- if (Z_TYPE_P(obj) == IS_STRING) { ++ /* ++ allow_string - is_a default is no, is_subclass_of is yes. ++ if it's allowed, then the autoloader will be called if the class does not exist. ++ default behaviour is different, as 'is_a' usage is normally to test mixed return values ++ */ ++ ++ if (allow_string && Z_TYPE_P(obj) == IS_STRING) { + zend_class_entry **the_ce; + if (zend_lookup_class(Z_STRVAL_P(obj), Z_STRLEN_P(obj), &the_ce TSRMLS_CC) == FAILURE) { + RETURN_FALSE; |