]> granicus.if.org Git - php/commitdiff
Don't allow properties on GdImage
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 22 Oct 2020 08:34:14 +0000 (10:34 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 22 Oct 2020 08:34:14 +0000 (10:34 +0200)
Just like all the other former resources... we missed this case.

ext/gd/gd.c

index 22473798846f4930240c97b0c084dc1e958e57ca..88d04824eac9d6d87810c36c9c7fc938577f8e29 100644 (file)
@@ -222,7 +222,7 @@ static void php_gd_object_minit_helper()
        zend_class_entry ce;
        INIT_CLASS_ENTRY(ce, "GdImage", class_GdImage_methods);
        gd_image_ce = zend_register_internal_class(&ce);
-       gd_image_ce->ce_flags |= ZEND_ACC_FINAL;
+       gd_image_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
        gd_image_ce->create_object = php_gd_image_object_create;
        gd_image_ce->serialize = zend_class_serialize_deny;
        gd_image_ce->unserialize = zend_class_unserialize_deny;