mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 00:11:07 -06:00
liblzma: Avoid possible overflow on signed left shift
Use an unsigned value to produce the needed mask.
This commit is contained in:
@@ -103,7 +103,7 @@ x86_code(lzma_simple *simple, uint32_t now_pos, bool is_encoder,
|
||||
if (!Test86MSByte(b))
|
||||
break;
|
||||
|
||||
src = dest ^ ((1 << (32 - i * 8)) - 1);
|
||||
src = dest ^ ((1u << (32 - i * 8)) - 1);
|
||||
}
|
||||
|
||||
buffer[buffer_pos + 4]
|
||||
|
||||
Reference in New Issue
Block a user