Skip to content

Commit

Permalink
Fix #782
Browse files Browse the repository at this point in the history
  • Loading branch information
romainthomas committed Sep 12, 2022
1 parent fde2c48 commit 98d3392
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/MachO/BinaryParser.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -1634,6 +1634,10 @@ ok_error_t BinaryParser::parse_dyldinfo_generic_bind() {
case BIND_SUBOPCODE_THREADED::BIND_SUBOPCODE_THREADED_APPLY:
{
uint64_t delta = 0;
if (segment_idx >= segments.size()) {
LIEF_ERR("Wrong index ({:d})", segment_idx);
return make_error_code(lief_errors::corrupted);
}
const SegmentCommand& current_segment = segments[segment_idx];
do {
const uint64_t address = current_segment.virtual_address() + segment_offset;
Expand Down

0 comments on commit 98d3392

Please sign in to comment.