mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
liblzma: fix undefined shift result
When a 32-bit integer is shifted left by 32 bits, the result is undefined. Shift a 64-bit integer instead.
This commit is contained in:
@@ -97,7 +97,7 @@ x86_code(void *simple_ptr, uint32_t now_pos, bool is_encoder,
|
||||
if (!Test86MSByte(b))
|
||||
break;
|
||||
|
||||
src = dest ^ ((1u << (32 - i * 8)) - 1);
|
||||
src = dest ^ ((1ull << (32 - i * 8)) - 1);
|
||||
}
|
||||
|
||||
buffer[buffer_pos + 4]
|
||||
|
Reference in New Issue
Block a user