common : fix iterator::end() dereference (#20445)

This commit is contained in:
Masato Nakasaka
2026-03-15 23:50:38 -07:00
committed by GitHub
parent 34818ea6c0
commit d3936498a3
+1 -1
View File
@@ -102,7 +102,7 @@ std::string regex_to_reversed_partial_regex(const std::string & pattern) {
auto is_star = *it == '*'; auto is_star = *it == '*';
++it; ++it;
if (is_star) { if (is_star) {
if (*it == '?') { if (it != end && *it == '?') {
++it; ++it;
} }
} }