[all-commits] [llvm/llvm-project] b910be: [llvm][MachO] Fix integer truncation in rebase/bin...
Zixu Wang via All-commits
all-commits at lists.llvm.org
Wed May 8 18:53:37 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b910bebc300dafb30569cecc3017b446ea8eafa0
https://github.com/llvm/llvm-project/commit/b910bebc300dafb30569cecc3017b446ea8eafa0
Author: Zixu Wang <9819235+zixu-w at users.noreply.github.com>
Date: 2024-05-08 (Wed, 08 May 2024)
Changed paths:
M llvm/include/llvm/Object/MachO.h
M llvm/lib/Object/MachOObjectFile.cpp
A llvm/test/Object/Inputs/MachO/bind-negative-skip.yaml
A llvm/test/Object/macho-bind-negative-skip.test
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list