Skip to content

Commit b5a23d8

Browse files
authored
Explicitly initialize object variables passed to Z_PARAM_OBJ_OF_CLASS_OR_LONG_OR_NULL (#13146)
In order to avoid possible miscompilations like #13082
1 parent 0b7587f commit b5a23d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/intl/dateformat/dateformat_attrcpp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ U_CFUNC PHP_FUNCTION(datefmt_get_calendar_object)
158158
/* {{{ Set formatter's calendar. */
159159
U_CFUNC PHP_FUNCTION(datefmt_set_calendar)
160160
{
161-
zend_object *calendar_obj;
162-
zend_long calendar_long;
161+
zend_object *calendar_obj = NULL;
162+
zend_long calendar_long = 0;
163163
bool calendar_is_null;
164164
DATE_FORMAT_METHOD_INIT_VARS;
165165

0 commit comments

Comments
 (0)