Fix UB pointer arithmetics on NULL

Closes GH-9559
This commit is contained in:
Ilija Tovilo 2022-09-16 17:07:52 +02:00
parent 3f1e9235e1
commit fe0eaf107a
No known key found for this signature in database
GPG key ID: A4F5D403F118200A

View file

@ -305,6 +305,7 @@ ZEND_API void destroy_zend_class(zval *zv)
}
} ZEND_HASH_FOREACH_END();
if (ce->default_properties_table) {
p = ce->default_properties_table;
end = p + ce->default_properties_count;
@ -312,6 +313,7 @@ ZEND_API void destroy_zend_class(zval *zv)
zval_ptr_dtor_nogc(p);
p++;
}
}
return;
}