diff options
author | Brad King <brad.king@kitware.com> | 2016-05-25 14:02:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-25 14:02:02 (GMT) |
commit | 8479dc46f12831c7736ce59b5833e43509899f7d (patch) | |
tree | 8db8bd335182706642e98f23fe12fbc0576e0c92 /Utilities/cmliblzma/liblzma | |
parent | 6052e4b3bfe62a8d29ca679affb101c7aec0d219 (diff) | |
download | CMake-8479dc46f12831c7736ce59b5833e43509899f7d.zip CMake-8479dc46f12831c7736ce59b5833e43509899f7d.tar.gz CMake-8479dc46f12831c7736ce59b5833e43509899f7d.tar.bz2 |
liblzma: Avoid possible overflow on signed left shift
Use an unsigned value to produce the needed mask.
Diffstat (limited to 'Utilities/cmliblzma/liblzma')
-rw-r--r-- | Utilities/cmliblzma/liblzma/simple/x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Utilities/cmliblzma/liblzma/simple/x86.c b/Utilities/cmliblzma/liblzma/simple/x86.c index 101d8ed..95858e5 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] |