Skip to content

Commit

Permalink
Fix oobread in the macho parser ##crash
Browse files Browse the repository at this point in the history
* Reported by @Han0nly via huntr.dev
* Reproducers: heapoverflow1
* BountyID: e589bd97-4c74-4e79-93b5-0951a281facc
  • Loading branch information
radare authored and trufae committed Apr 5, 2022
1 parent a4dbf11 commit ca8d8b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libr/bin/format/mach0/mach0.c
Original file line number Diff line number Diff line change
Expand Up @@ -3178,7 +3178,7 @@ static void parse_relocation_info(struct MACH0_(obj_t) *bin, RSkipList *relocs,
for (i = 0; i < num; i++) {
struct relocation_info a_info = info[i];
ut32 sym_num = a_info.r_symbolnum;
if (sym_num > bin->nsymtab) {
if (sym_num >= bin->nsymtab) {
continue;
}

Expand Down

0 comments on commit ca8d8b3

Please # to comment.