mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 02:52:53 +02:00
Fix overflowing signed left shift, found by ubsan buildbot.
This commit is contained in:
parent
65e46aa23b
commit
d38c68eaec
@ -176,7 +176,7 @@ inline int64_t decodeSLEB128(const uint8_t *p, unsigned *n = nullptr,
|
||||
return 0;
|
||||
}
|
||||
Byte = *p;
|
||||
int64_t Slice = Byte & 0x7f;
|
||||
uint64_t Slice = Byte & 0x7f;
|
||||
if ((Shift >= 64 && Slice != (Value < 0 ? 0x7f : 0x00)) ||
|
||||
(Shift == 63 && Slice != 0 && Slice != 0x7f)) {
|
||||
if (error)
|
||||
|
Loading…
Reference in New Issue
Block a user