Skip to content

Commit

Permalink
Remove sanity check introduced in previous commit.
Browse files Browse the repository at this point in the history
section->size if not necessarily lesser than elf_size because sections don't always represent a chunk of data inside the ELF file. Sections of type SHT_NOBITS can have arbitrary sizes not related to the the ELF file size.
  • Loading branch information
plusvic committed Oct 30, 2015
1 parent 5d6d8b1 commit 469bf12
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion libyara/modules/elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ uint64_t elf_rva_to_offset_##bits( \
{ \
if (section->type != ELF_SHT_NULL && \
section->type != ELF_SHT_NOBITS && \
section->size <= elf_size && \
rva >= section->addr && \
rva < section->addr + section->size) \
{ \
Expand Down

0 comments on commit 469bf12

Please sign in to comment.