Browse Source

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.
Kyle Edwards 6 years ago
parent
commit
bf2503089b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Utilities/cmliblzma/liblzma/simple/x86.c

+ 1 - 1
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]