Skip to content

Commit

Permalink
Fix uninitialized (dummy) memory in php_strtr_array()
Browse files Browse the repository at this point in the history
Fixes one issue in phpGH-14806.
  • Loading branch information
nielsdos committed Jul 4, 2024
1 parent 070779c commit 87a67e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/standard/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -3275,7 +3275,7 @@ PHP_FUNCTION(strtr)
/* case_sensitive */ true,
NULL));
} else {
zend_long dummy;
zend_long dummy = 0;
RETVAL_STR(php_str_to_str_ex(str,
ZSTR_VAL(str_key), ZSTR_LEN(str_key),
ZSTR_VAL(replace), ZSTR_LEN(replace), &dummy));
Expand Down

0 comments on commit 87a67e2

Please sign in to comment.