summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>2013-03-11 07:47:42 +0000
committersfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>2013-03-11 07:47:42 +0000
commitf402291bf98d9e380f00d35033570e851f5318b2 (patch)
treede0b7f1543e90caa6a186151563a85e2890cd12c
parent44a97ac647a6c996ec1479f518fe0ea0c7a1ce7f (diff)
downloadedk2-f402291bf98d9e380f00d35033570e851f5318b2.tar.gz
edk2-f402291bf98d9e380f00d35033570e851f5318b2.tar.bz2
edk2-f402291bf98d9e380f00d35033570e851f5318b2.zip
Initialize DefaultInfo before using it.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Ouyang Qian <qian.ouyang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14168 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c1
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
index 0a00ac8504..7bdffc55d0 100644
--- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
+++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
@@ -837,6 +837,7 @@ EfiPxeBcDiscover (
// If info isn't offered,
// use the cached DhcpAck and ProxyOffer packets.
//
+ ZeroMem (&DefaultInfo, sizeof (EFI_PXE_BASE_CODE_DISCOVER_INFO));
if (*Layer != EFI_PXE_BASE_CODE_BOOT_LAYER_INITIAL) {
if (!Mode->PxeDiscoverValid || !Mode->PxeReplyReceived || (!Mode->PxeBisReplyReceived && UseBis)) {
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
index 6c36d058f6..07f2b6cfc2 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
@@ -566,6 +566,7 @@ EfiPxeBcDiscover (
//
// There are 3 methods to get the information for discover.
//
+ ZeroMem (&DefaultInfo, sizeof (EFI_PXE_BASE_CODE_DISCOVER_INFO));
if (*Layer != EFI_PXE_BASE_CODE_BOOT_LAYER_INITIAL) {
//
// 1. Take the previous setting as the discover info.