diff options
author | 2020-04-19 13:44:14 +0000 | |
---|---|---|
committer | 2020-04-19 13:44:14 +0000 | |
commit | c49330cd911549e8b053d768dbbecebe727c55dd (patch) | |
tree | acdddf5f22729881ce10407f2402aa5b51217caf | |
parent | spelling fix; (diff) | |
download | wireguard-openbsd-c49330cd911549e8b053d768dbbecebe727c55dd.tar.xz wireguard-openbsd-c49330cd911549e8b053d768dbbecebe727c55dd.zip |
Initialize vmx_get_guest_faulttype() 'prot' to 0 instead of using
random stack garbage.
CID 1492655
ok pd@
-rw-r--r-- | sys/arch/amd64/amd64/vmm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/vmm.c b/sys/arch/amd64/amd64/vmm.c index 8b2bc9f0192..f308948ef4f 100644 --- a/sys/arch/amd64/amd64/vmm.c +++ b/sys/arch/amd64/amd64/vmm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmm.c,v 1.271 2020/04/08 07:39:48 pd Exp $ */ +/* $OpenBSD: vmm.c,v 1.272 2020/04/19 13:44:14 krw Exp $ */ /* * Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org> * @@ -5415,6 +5415,7 @@ vmx_get_guest_faulttype(void) if (exit_qual & IA32_VMX_EPT_FAULT_WAS_EXECABLE) was_prot |= PROT_EXEC; + prot = 0; if (exit_qual & IA32_VMX_EPT_FAULT_READ) prot = PROT_READ; else if (exit_qual & IA32_VMX_EPT_FAULT_WRITE) |