diff options
author | Prasad J Pandit <pjp@fedoraproject.org> | 2016-04-07 12:50:08 +0530 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-05-23 16:53:43 +0200 |
commit | 691a02e2ce0c413236a78dee6f2651c937b09fb0 (patch) | |
tree | fec6b40d5866f3c0663cecf8ffd6346864551e4d | |
parent | dfc007f7f7aab982a8c22cbcb783d72b0db99705 (diff) | |
download | qemu-691a02e2ce0c413236a78dee6f2651c937b09fb0.zip qemu-691a02e2ce0c413236a78dee6f2651c937b09fb0.tar.gz qemu-691a02e2ce0c413236a78dee6f2651c937b09fb0.tar.bz2 |
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 <donghai.zdh@alibaba-inc.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Message-Id: <1460013608-16670-1-git-send-email-ppandit@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | hw/i386/kvmvapic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c index 8fd27ba..5b71b1b 100644 --- a/hw/i386/kvmvapic.c +++ b/hw/i386/kvmvapic.c @@ -397,7 +397,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; uint32_t current_flags = 0; |