Skip to content

Commit

Permalink
Fix one-off pattern mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
ViRb3 committed Aug 17, 2024
1 parent 6f4badc commit 3b16cc5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions objfile/patterns.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,12 @@ func FindRegex(data []byte, regexInfo *RegexAndNeedle) [][]int {
data_end := needleMatch + regexInfo.len - regexInfo.needleOffset
if data_start >= data_len {
continue
} else if data_start <= 0 {
}
if data_start < 0 {
data_start = 0
}

if data_end >= data_len {
data_end = data_len - 1
if data_end > data_len {
data_end = data_len
}

// don't repeat previously scanned chunks
Expand Down

0 comments on commit 3b16cc5

Please sign in to comment.