From: Prasad J Pandit Date: Thu, 7 Apr 2016 07:20:08 +0000 (+0530) Subject: i386: kvmvapic: initialise imm32 variable X-Git-Tag: v2.6.1~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d00ba3fa9b58b3128edef8e4ed840921e29dcd88;p=thirdparty%2Fqemu.git i386: kvmvapic: initialise imm32 variable When processing Task Priorty Register(TPR) access, it could leak automatic stack variable 'imm32' in patch_instruction(). Initialise the variable to avoid it. Reported by: Donghai Zdh Cc: qemu-stable@nongnu.org Signed-off-by: Prasad J Pandit Message-Id: <1460013608-16670-1-git-send-email-ppandit@redhat.com> Signed-off-by: Paolo Bonzini (cherry picked from commit 691a02e2ce0c413236a78dee6f2651c937b09fb0) Signed-off-by: Michael Roth --- diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c index c69f3740494..ff1e31a4d26 100644 --- a/hw/i386/kvmvapic.c +++ b/hw/i386/kvmvapic.c @@ -394,7 +394,7 @@ static void patch_instruction(VAPICROMState *s, X86CPU *cpu, target_ulong ip) CPUX86State *env = &cpu->env; VAPICHandlers *handlers; uint8_t opcode[2]; - uint32_t imm32; + uint32_t imm32 = 0; target_ulong current_pc = 0; target_ulong current_cs_base = 0; int current_flags = 0;