llvm-project
b910bebc - [llvm][MachO] Fix integer truncation in rebase/bind parsing (#89337)

Commit
1 year ago
[llvm][MachO] Fix integer truncation in rebase/bind parsing (#89337) `Count` and `Skip` should use `uint64_t` as they are encoded/decoded using 64-bit ULEB128. In `*_OPCODE_DO_*_ULEB_TIMES_SKIPPING_ULEB`, `Skip` could be encoded as a two's complement for moving `SegmentOffset` backwards. Having a 32-bit `Skip` truncates the encoded value and leads to a malformed `AdvanceAmount` and invalid `SegmentOffset` that extends past valid sections.
Author
Parents
Loading