summaryrefslogtreecommitdiffstats
path: root/liblzma/simple/armthumb.c
diff options
context:
space:
mode:
authorliblzma upstream <xz-devel@tukaani.org>2020-03-17 14:27:42 (GMT)
committerBrad King <brad.king@kitware.com>2021-04-22 19:39:31 (GMT)
commitee909a8e8b785b68c6a14fd52cc12b1841051a7d (patch)
treec2f9481b2b46ef33120fa295a2ffb7caf0c41c63 /liblzma/simple/armthumb.c
parent352b8fa70d18ff1664cd8b22f42cf980a976ae4d (diff)
downloadCMake-ee909a8e8b785b68c6a14fd52cc12b1841051a7d.zip
CMake-ee909a8e8b785b68c6a14fd52cc12b1841051a7d.tar.gz
CMake-ee909a8e8b785b68c6a14fd52cc12b1841051a7d.tar.bz2
liblzma 2020-03-17 (2327a461)
Code extracted from: https://git.tukaani.org/xz.git at commit 2327a461e1afce862c22269b80d3517801103c1b (v5.2.5).
Diffstat (limited to 'liblzma/simple/armthumb.c')
-rw-r--r--liblzma/simple/armthumb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/liblzma/simple/armthumb.c b/liblzma/simple/armthumb.c
index eab4862..a8da334 100644
--- a/liblzma/simple/armthumb.c
+++ b/liblzma/simple/armthumb.c
@@ -23,10 +23,10 @@ armthumb_code(void *simple lzma_attribute((__unused__)),
for (i = 0; i + 4 <= size; i += 2) {
if ((buffer[i + 1] & 0xF8) == 0xF0
&& (buffer[i + 3] & 0xF8) == 0xF8) {
- uint32_t src = ((buffer[i + 1] & 0x7) << 19)
- | (buffer[i + 0] << 11)
- | ((buffer[i + 3] & 0x7) << 8)
- | (buffer[i + 2]);
+ uint32_t src = (((uint32_t)(buffer[i + 1]) & 7) << 19)
+ | ((uint32_t)(buffer[i + 0]) << 11)
+ | (((uint32_t)(buffer[i + 3]) & 7) << 8)
+ | (uint32_t)(buffer[i + 2]);
src <<= 1;