File php-CVE-2016-6295.patch of Package php7.7220

Index: php-7.0.7/ext/snmp/snmp.c
===================================================================
--- php-7.0.7.orig/ext/snmp/snmp.c	2016-08-02 17:21:03.991673833 +0200
+++ php-7.0.7/ext/snmp/snmp.c	2016-08-02 17:23:01.413571071 +0200
@@ -2074,6 +2074,14 @@ static int php_snmp_has_property(zval *o
 }
 /* }}} */
 
+static HashTable *php_snmp_get_gc(zval *object, zval ***gc_data, int *gc_data_count TSRMLS_DC) /* {{{ */
+{
+       *gc_data = NULL;
+       *gc_data_count = 0;
+       return zend_std_get_properties(object TSRMLS_CC);
+}
+/* }}} */
+
 /* {{{ php_snmp_get_properties(zval *object)
    Returns all object properties. Injects SNMP properties into object on first call */
 static HashTable *php_snmp_get_properties(zval *object)
@@ -2364,6 +2372,7 @@ PHP_MINIT_FUNCTION(snmp)
 	php_snmp_object_handlers.write_property = php_snmp_write_property;
 	php_snmp_object_handlers.has_property = php_snmp_has_property;
 	php_snmp_object_handlers.get_properties = php_snmp_get_properties;
+	php_snmp_object_handlers.get_gc = php_snmp_get_gc;
 
 	/* Register SNMP Class */
 	INIT_CLASS_ENTRY(ce, "SNMP", php_snmp_class_methods);
openSUSE Build Service is sponsored by