Skip to content

Fix uninitialized bytes in zend_constant.value #11730

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Zend/zend_constants.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void zend_shutdown_constants(void)

ZEND_API void zend_register_null_constant(const char *name, size_t name_len, int flags, int module_number)
{
zend_constant c;
zend_constant c = {0};

ZVAL_NULL(&c.value);
ZEND_CONSTANT_SET_FLAGS(&c, flags, module_number);
Expand All @@ -160,7 +160,7 @@ ZEND_API void zend_register_null_constant(const char *name, size_t name_len, int

ZEND_API void zend_register_bool_constant(const char *name, size_t name_len, bool bval, int flags, int module_number)
{
zend_constant c;
zend_constant c = {0};

ZVAL_BOOL(&c.value, bval);
ZEND_CONSTANT_SET_FLAGS(&c, flags, module_number);
Expand Down