We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 460e4fa commit 50b16fcCopy full SHA for 50b16fc
Zend/zend_async_API.c
@@ -442,6 +442,9 @@ void coroutine_event_callback_dispose(
442
ZEND_API zend_coroutine_event_callback_t *zend_async_coroutine_callback_new(
443
zend_coroutine_t *coroutine, zend_async_event_callback_fn callback, size_t size)
444
{
445
+ ZEND_ASSERT(size == 0 || size >= sizeof(zend_coroutine_event_callback_t) &&
446
+ "Size must be at least sizeof(zend_coroutine_event_callback_t)");
447
+
448
zend_coroutine_event_callback_t *coroutine_callback
449
= ecalloc(1, size != 0 ? size : sizeof(zend_coroutine_event_callback_t));
450
0 commit comments