[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/13] target-i386: fix Coverity complaints about ove
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 10/13] target-i386: fix Coverity complaints about overflows |
Date: |
Thu, 13 Nov 2014 16:40:25 +0100 |
sipi_vector is an int; it is shifted by 12 and passed as a 64-bit value,
which makes Coverity think that we wanted (uint64_t)sipi_vector << 12.
But actually it must be between 0 and 255. Make this explicit.
Signed-off-by: Paolo Bonzini <address@hidden>
---
target-i386/cpu.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 1b2c12a..015f5b5 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -1104,7 +1104,7 @@ static inline void cpu_x86_load_seg_cache(CPUX86State
*env,
}
static inline void cpu_x86_load_seg_cache_sipi(X86CPU *cpu,
- int sipi_vector)
+ uint8_t sipi_vector)
{
CPUState *cs = CPU(cpu);
CPUX86State *env = &cpu->env;
--
1.8.3.1
- [Qemu-devel] [PULL 02/13] virtio-scsi: work around bug in old BIOSes, (continued)
- [Qemu-devel] [PULL 02/13] virtio-scsi: work around bug in old BIOSes, Paolo Bonzini, 2014/11/13
- [Qemu-devel] [PULL 03/13] esp: fix coding standards, Paolo Bonzini, 2014/11/13
- [Qemu-devel] [PULL 04/13] virtio-scsi: dataplane: fix allocation for 'cmd_vrings', Paolo Bonzini, 2014/11/13
- [Qemu-devel] [PULL 05/13] esp: Do not overwrite ESP_TCHI after reset, Paolo Bonzini, 2014/11/13
- [Qemu-devel] [PULL 06/13] virtio-scsi: dataplane: suppress guest notification, Paolo Bonzini, 2014/11/13
- [Qemu-devel] [PULL 09/13] apic_common: migrate missing fields, Paolo Bonzini, 2014/11/13
- [Qemu-devel] [PULL 11/13] kvmclock: Add comment explaining why we need cpu_clean_all_dirty(), Paolo Bonzini, 2014/11/13
- [Qemu-devel] [PULL 07/13] virtio-scsi: Fix comment for VirtIOSCSIReq, Paolo Bonzini, 2014/11/13
- [Qemu-devel] [PULL 08/13] target-i386: eliminate dead code and hoist common code out of "if", Paolo Bonzini, 2014/11/13
- [Qemu-devel] [PULL 12/13] smbios: change 'ram_addr_t' variables to 'uint64_t', Paolo Bonzini, 2014/11/13
- [Qemu-devel] [PULL 10/13] target-i386: fix Coverity complaints about overflows,
Paolo Bonzini <=
- [Qemu-devel] [PULL 13/13] acpi: accurate overflow check, Paolo Bonzini, 2014/11/13
- Re: [Qemu-devel] [PULL 00/13] x86 and SCSI patches for QEMU 2.2.0-rc2, Peter Maydell, 2014/11/13