mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
Fix ubsan bounds check failure.
llvm-svn: 332866
This commit is contained in:
parent
58b84296b9
commit
492891ef83
@ -365,7 +365,8 @@ bool X86AsmBackend::writeNopData(raw_ostream &OS, uint64_t Count) const {
|
||||
for (uint8_t i = 0; i < Prefixes; i++)
|
||||
OS << '\x66';
|
||||
const uint8_t Rest = ThisNopLength - Prefixes;
|
||||
OS.write(Nops[Rest - 1], Rest);
|
||||
if (Rest != 0)
|
||||
OS.write(Nops[Rest - 1], Rest);
|
||||
Count -= ThisNopLength;
|
||||
} while (Count != 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user