summaryrefslogtreecommitdiff
path: root/Utilities/cmliblzma
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-05-25 10:02:02 -0400
committerBrad King <brad.king@kitware.com>2016-05-25 10:02:02 -0400
commit8479dc46f12831c7736ce59b5833e43509899f7d (patch)
tree8db8bd335182706642e98f23fe12fbc0576e0c92 /Utilities/cmliblzma
parent6052e4b3bfe62a8d29ca679affb101c7aec0d219 (diff)
downloadcmake-8479dc46f12831c7736ce59b5833e43509899f7d.tar.gz
liblzma: Avoid possible overflow on signed left shift
Use an unsigned value to produce the needed mask.
Diffstat (limited to 'Utilities/cmliblzma')
-rw-r--r--Utilities/cmliblzma/liblzma/simple/x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Utilities/cmliblzma/liblzma/simple/x86.c b/Utilities/cmliblzma/liblzma/simple/x86.c
index 101d8edff9..95858e51e4 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]