Skip to content

Commit

Permalink
check for thumbness first before denormalization
Browse files Browse the repository at this point in the history
fixes issue with patching thumb arm PIE binaries
  • Loading branch information
Ninja3047 committed Feb 13, 2024
1 parent 5ca6f0b commit dd824d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/patcherex2/components/binary_analyzers/angr.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ def get_basic_block(self, addr):
}

def get_instr_bytes_at(self, addr):
addr = self.denormalize_addr(addr)
addr += 1 if self.is_thumb(addr) else 0
addr = self.denormalize_addr(addr)
return self.p.factory.block(addr, num_inst=1).bytes

def get_unused_funcs(self):
Expand Down

0 comments on commit dd824d5

Please sign in to comment.