mirror of
https://github.com/reactos/CMake.git
synced 2024-11-29 06:20:23 +00:00
liblzma: Avoid possible overflow on signed left shift
Use an unsigned value to produce the needed mask.
This commit is contained in:
parent
6052e4b3bf
commit
8479dc46f1
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user