mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fix UB pointer arithmetics on NULL
Closes GH-9559
This commit is contained in:
parent
3f1e9235e1
commit
fe0eaf107a
1 changed files with 7 additions and 5 deletions
|
@ -305,12 +305,14 @@ ZEND_API void destroy_zend_class(zval *zv)
|
|||
}
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
|
||||
p = ce->default_properties_table;
|
||||
end = p + ce->default_properties_count;
|
||||
if (ce->default_properties_table) {
|
||||
p = ce->default_properties_table;
|
||||
end = p + ce->default_properties_count;
|
||||
|
||||
while (p < end) {
|
||||
zval_ptr_dtor_nogc(p);
|
||||
p++;
|
||||
while (p < end) {
|
||||
zval_ptr_dtor_nogc(p);
|
||||
p++;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue