[7zip] Another shift UB caused by integer promotion

This commit is contained in:
Tim Kientzle committed 2026-05-07 22:04:20 -07:00
1 parent e46e2c389a
commit 7c9ad86cf4
1 file changed
+1 -1
@@ -4311,7 +4311,7 @@ sparc_Convert(struct _7zip *zip, uint8_t *buf, size_t size)
size &= ~(size_t)3;
for (i = 0; i < size; i += 4) {
instr = (uint32_t)(buf[i] << 24)
instr = ((uint32_t)buf[i] << 24)
| ((uint32_t)buf[i+1] << 16)
| ((uint32_t)buf[i+2] << 8)
| (uint32_t)buf[i+3];