Skip to content

Commit d393649

Browse files
authored
common : fix iterator::end() dereference (#20445)
1 parent 34818ea commit d393649

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

common/regex-partial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ std::string regex_to_reversed_partial_regex(const std::string & pattern) {
102102
auto is_star = *it == '*';
103103
++it;
104104
if (is_star) {
105-
if (*it == '?') {
105+
if (it != end && *it == '?') {
106106
++it;
107107
}
108108
}

0 commit comments

Comments
 (0)