From 7b74cadf8c12abbba91be08e47dd4cca5d2db4a0 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 4 Jul 2024 04:34:33 -0700 Subject: [PATCH] Fix uninitialized (dummy) memory in php_strtr_array() (#14812) Fixes one issue in GH-14806. --- ext/standard/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/string.c b/ext/standard/string.c index e8c682a4cb77b..0cc8af0ef366d 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -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));