Skip to content

Commit

Permalink
Remove unnecessary paranoid check.
Browse files Browse the repository at this point in the history
The OP_COUNT_IN operation does not need the paranoid check on r1 as it is the
lower bound of the range, and thus a constant and not a pointer somewhere. It
should, instead, be checking r3.

Fixes #1721 (the first half of it).
  • Loading branch information
wxsBSD committed Jun 1, 2022
1 parent 64fd1ef commit 8b99302
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions libyara/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1406,10 +1406,6 @@ int yr_execute_code(YR_SCAN_CONTEXT* context)
ensure_defined(r1);
ensure_defined(r2);

#if YR_PARANOID_EXEC
ensure_within_rules_arena(r1.p);
#endif

match = context->matches[r3.s->idx].head;
r4.i = 0;

Expand Down

0 comments on commit 8b99302

Please sign in to comment.