From d3936498a3d8f41cdb35d9e7d04a19e704b4fc89 Mon Sep 17 00:00:00 2001 From: Masato Nakasaka Date: Sun, 15 Mar 2026 23:50:38 -0700 Subject: [PATCH] common : fix iterator::end() dereference (#20445) --- common/regex-partial.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/regex-partial.cpp b/common/regex-partial.cpp index e667a209e9..bd9034e931 100644 --- a/common/regex-partial.cpp +++ b/common/regex-partial.cpp @@ -102,7 +102,7 @@ std::string regex_to_reversed_partial_regex(const std::string & pattern) { auto is_star = *it == '*'; ++it; if (is_star) { - if (*it == '?') { + if (it != end && *it == '?') { ++it; } }