From a241ef8da027753f0b353f049da91abf133a02a8 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Fri, 6 Sep 2024 12:08:19 +0100 Subject: [PATCH] Fix #12917: Write to negative array index for some string patterns. Don't popped closed pair from the parenthesis stack a second time. --- src/3rdparty/icu/scriptrun.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/3rdparty/icu/scriptrun.cpp b/src/3rdparty/icu/scriptrun.cpp index d0ed37dcb9..22bcb7e8db 100644 --- a/src/3rdparty/icu/scriptrun.cpp +++ b/src/3rdparty/icu/scriptrun.cpp @@ -184,13 +184,6 @@ UBool ScriptRun::next() parenStack[++startSP].scriptCode = scriptCode; } } - - // if this character is a close paired character, - // pop it from the stack - if (pairIndex >= 0 && (pairIndex & 1) != 0 && parenSP >= 0) { - parenSP -= 1; - startSP -= 1; - } } else { // if the run broke on a surrogate pair, // end it before the high surrogate