Skip to content

Commit

Permalink
Fix null deref in xnu.kernelcache ##crash
Browse files Browse the repository at this point in the history
* Reported by @xshad3 via huntr.dev
  • Loading branch information
radare committed Jan 31, 2022
1 parent 72ffc02 commit feaa4e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libr/bin/p/bin_xnu_kernelcache.c
Expand Up @@ -242,7 +242,9 @@ static bool load_buffer(RBinFile *bf, void **bin_obj, RBuffer *buf, ut64 loadadd

beach:
r_buf_free (fbuf);
obj->cache_buf = NULL;
if (obj) {
obj->cache_buf = NULL;
}
MACH0_(mach0_free) (main_mach0);
return false;
}
Expand Down

1 comment on commit feaa4e7

@dglynos
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.