liblzma: Avoid possible overflow on signed left shift

Use an unsigned value to produce the needed mask.
This commit is contained in:
Brad King 2016-05-25 10:02:02 -04:00
parent 6052e4b3bf
commit 8479dc46f1
1 changed files with 1 additions and 1 deletions

View File

@ -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]