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.
This commit is contained in:
Kyle Edwards committed 2019-01-14 09:53:12 -05:00
1 parent ee555c2a33
commit bf2503089b
1 file changed
+1 -1
+1 -1
View File
@@ -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]