Commit 2aef2718 authored by Paul Wankadia's avatar Paul Wankadia
Browse files

Don't dereference params->start unconditionally.

Change-Id: I92d0867434a7668a81278de82af45d0a29b9d1e6
Reviewed-on: https://code-review.googlesource.com/c/re2/+/56216


Reviewed-by: default avatarPaul Wankadia <junyer@google.com>
Showing with 1 addition and 0 deletions
+1 -0
......@@ -1702,6 +1702,7 @@ bool DFA::AnalyzeSearch(SearchParams* params) {
// different state!
if (prog_->first_byte() >= 0 &&
!params->anchored &&
params->start > SpecialStateMax &&
params->start->flag_ >> kFlagNeedShift == 0)
params->have_first_byte = true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment