Skip to content

Commit

Permalink
Always check for null when calling calloc in dyldcache.c
Browse files Browse the repository at this point in the history
  • Loading branch information
wargio committed Sep 13, 2024
1 parent fb59d87 commit a7ff216
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions librz/bin/format/mach0/dyldcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ static void populate_cache_maps(RzDyldCache *cache) {
return;
}
cache_map_t *maps = RZ_NEWS0(cache_map_t, n_maps);
if (!maps) {
return;
}

ut32 next_map = 0;
ut32 last_idx = UT32_MAX;
Expand Down

0 comments on commit a7ff216

Please sign in to comment.