[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/28] hw/display/exynos4210_fimd: Fix bit-swapping c
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 04/28] hw/display/exynos4210_fimd: Fix bit-swapping code |
Date: |
Mon, 15 Jun 2015 18:24:34 +0100 |
fimd_swap_data() includes code to reverse the bits in a
64-bit integer, but an off-by-one error meant that it would
try to shift off the top of the integer. Correct the bug
(spotted by Coverity).
Signed-off-by: Peter Maydell <address@hidden>
Message-id: address@hidden
---
hw/display/exynos4210_fimd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/display/exynos4210_fimd.c b/hw/display/exynos4210_fimd.c
index 72b3a1d..603ef50 100644
--- a/hw/display/exynos4210_fimd.c
+++ b/hw/display/exynos4210_fimd.c
@@ -337,7 +337,7 @@ static inline void fimd_swap_data(unsigned int swap_ctl,
uint64_t *data)
if (swap_ctl & FIMD_WINCON_SWAP_BITS) {
res = 0;
for (i = 0; i < 64; i++) {
- if (x & (1ULL << (64 - i))) {
+ if (x & (1ULL << (63 - i))) {
res |= (1ULL << i);
}
}
--
1.9.1
- [Qemu-devel] [PULL 06/28] target-arm/kvm64: Add cortex-a53 cpu support, (continued)
- [Qemu-devel] [PULL 06/28] target-arm/kvm64: Add cortex-a53 cpu support, Peter Maydell, 2015/06/15
- [Qemu-devel] [PULL 14/28] hw/arm/pxa2xx: Add reset method for pxa2xx_ssp, Peter Maydell, 2015/06/15
- [Qemu-devel] [PULL 01/28] target-arm: Handle "extended small page" descriptors correctly, Peter Maydell, 2015/06/15
- [Qemu-devel] [PULL 11/28] target-arm: Use the kernel's idea of MPIDR if we're using KVM, Peter Maydell, 2015/06/15
- [Qemu-devel] [PULL 10/28] MAINTAINERS: Add myself as ARM ACPI Subsystem maintainer, Peter Maydell, 2015/06/15
- [Qemu-devel] [PULL 21/28] arm: Refactor get_phys_addr FSR return mechanism, Peter Maydell, 2015/06/15
- [Qemu-devel] [PULL 17/28] target-arm: Add the THUMB_DSP feature, Peter Maydell, 2015/06/15
- [Qemu-devel] [PULL 13/28] hw/arm/pxa2xx: Convert pxa2xx-fir to QOM and VMState, Peter Maydell, 2015/06/15
- [Qemu-devel] [PULL 07/28] hw/arm/virt: Add cortex-a53 cpu support in machine virt, Peter Maydell, 2015/06/15
- [Qemu-devel] [PULL 02/28] target-arm: use extended address bits from supersection short descriptor, Peter Maydell, 2015/06/15
- [Qemu-devel] [PULL 04/28] hw/display/exynos4210_fimd: Fix bit-swapping code,
Peter Maydell <=
- Re: [Qemu-devel] [PULL 00/28] target-arm queue, Peter Maydell, 2015/06/16