Skip to content

Commit

Permalink
Fix out-of-bounds access for some regex matches.
Browse files Browse the repository at this point in the history
  • Loading branch information
grafikrobot committed Aug 7, 2023
1 parent d1abe21 commit 1452679
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engine/regexp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ struct executor
scan = scan.substr(count);
break;
case EXACTLY:
while (*opnd == scan[0])
while (!scan.empty() && *opnd == scan[0])
{
count++;
scan = scan.substr(1);
Expand Down

0 comments on commit 1452679

Please sign in to comment.