Skip to content

Commit

Permalink
Add missing buffer bounds check
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed Jul 5, 2017
1 parent a3e06c2 commit d7cb734
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libyara/modules/dotnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,8 @@ void dotnet_parse_tilde(
continue;

#define ROW_CHECK(name) \
rows.name = *(row_offset + matched_bits);
if (fits_in_pe(pe, row_offset, (matched_bits + 1) * sizeof(uint32_t))) \
rows.name = *(row_offset + matched_bits);

#define ROW_CHECK_WITH_INDEX(name) \
ROW_CHECK(name); \
Expand Down

0 comments on commit d7cb734

Please sign in to comment.