Skip to content

Commit 2053af6

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 79a8cf1 commit 2053af6

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
@@ -4513,10 +4513,10 @@ PHP_FUNCTION(array_column)
45134513
HashTable *input;
45144514
zval *colval, *data, rv;
45154515
zend_string *column_str = NULL;
4516-
zend_long column_long;
4516+
zend_long column_long = 0;
45174517
bool column_is_null = 0;
45184518
zend_string *index_str = NULL;
4519-
zend_long index_long;
4519+
zend_long index_long = 0;
45204520
bool index_is_null = 1;
45214521

45224522
ZEND_PARSE_PARAMETERS_START(2, 3)

0 commit comments

Comments
 (0)