summaryrefslogtreecommitdiffstats
path: root/Utilities/cmliblzma
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2019-01-11 21:22:37 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2019-01-14 14:53:12 (GMT)
commitbf2503089b19d1462be7838ed7364361481587d4 (patch)
tree292224891227af6ca51eeb05af9909caceee3aa2 /Utilities/cmliblzma
parentee555c2a33258a7b272f049aca369edf4d86fa7c (diff)
downloadCMake-bf2503089b19d1462be7838ed7364361481587d4.zip
CMake-bf2503089b19d1462be7838ed7364361481587d4.tar.gz
CMake-bf2503089b19d1462be7838ed7364361481587d4.tar.bz2
liblzma: fix undefined shift result
When a 32-bit integer is shifted left by 32 bits, the result is undefined. Shift a 64-bit integer instead.
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 23d0c42..b38cebf 100644
--- a/Utilities/cmliblzma/liblzma/simple/x86.c
+++ b/Utilities/cmliblzma/liblzma/simple/x86.c
@@ -97,7 +97,7 @@ x86_code(void *simple_ptr, uint32_t now_pos, bool is_encoder,
if (!Test86MSByte(b))
break;
- src = dest ^ ((1u << (32 - i * 8)) - 1);
+ src = dest ^ ((1ull << (32 - i * 8)) - 1);
}
buffer[buffer_pos + 4]