mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +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();
|
} ZEND_HASH_FOREACH_END();
|
||||||
|
|
||||||
p = ce->default_properties_table;
|
if (ce->default_properties_table) {
|
||||||
end = p + ce->default_properties_count;
|
p = ce->default_properties_table;
|
||||||
|
end = p + ce->default_properties_count;
|
||||||
|
|
||||||
while (p < end) {
|
while (p < end) {
|
||||||
zval_ptr_dtor_nogc(p);
|
zval_ptr_dtor_nogc(p);
|
||||||
p++;
|
p++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue