Skip to content

Commit 24a2949

Browse files
committed
Fix uouv in array_column
column_long and index_long might not be set, but are still used as arguments. They are not actually used if column_str is set, but it's better to initialize them anyway, if only to make MemorySanitizer happy.
1 parent 99504aa commit 24a2949

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/standard/array.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4266,10 +4266,10 @@ PHP_FUNCTION(array_column)
42664266
HashTable *input;
42674267
zval *colval, *data, rv;
42684268
zend_string *column_str = NULL;
4269-
zend_long column_long;
4269+
zend_long column_long = 0;
42704270
bool column_is_null = 0;
42714271
zend_string *index_str = NULL;
4272-
zend_long index_long;
4272+
zend_long index_long = 0;
42734273
bool index_is_null = 1;
42744274

42754275
ZEND_PARSE_PARAMETERS_START(2, 3)

0 commit comments

Comments
 (0)