From 8479dc46f12831c7736ce59b5833e43509899f7d Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 25 May 2016 10:02:02 -0400 Subject: [PATCH] liblzma: Avoid possible overflow on signed left shift Use an unsigned value to produce the needed mask. --- Utilities/cmliblzma/liblzma/simple/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilities/cmliblzma/liblzma/simple/x86.c b/Utilities/cmliblzma/liblzma/simple/x86.c index 101d8edff..95858e51e 100644 --- a/Utilities/cmliblzma/liblzma/simple/x86.c +++ b/Utilities/cmliblzma/liblzma/simple/x86.c @@ -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]