X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FSetupBrowserDxe%2FPresentation.c;fp=MdeModulePkg%2FUniversal%2FSetupBrowserDxe%2FPresentation.c;h=56ae7b02c21dac61bcbb92c5b2420594e84f3ac8;hb=05b2f9c94e0c0b663ff2d2fb55397d8215eeb3f5;hp=4c4e51d2f985f1e244ab54ce99befd548189caca;hpb=fa209e8c20d787c35dbb90c3c33f6db959aa1252;p=mirror_edk2.git
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
index 4c4e51d2f9..56ae7b02c2 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
@@ -1,7 +1,7 @@
/** @file
Utility functions for UI presentation.
-Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
(C) Copyright 2015 Hewlett Packard Enterprise Development LP
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -2044,6 +2044,7 @@ ProcessCallBackFunction (
ASSERT (StrLen (NewString) * sizeof (CHAR16) <= Statement->StorageWidth);
if (StrLen (NewString) * sizeof (CHAR16) <= Statement->StorageWidth) {
+ ZeroMem (Statement->BufferValue, Statement->StorageWidth);
CopyMem (Statement->BufferValue, NewString, StrSize (NewString));
} else {
CopyMem (Statement->BufferValue, NewString, Statement->StorageWidth);
@@ -2293,6 +2294,7 @@ ProcessRetrieveForQuestion (
ASSERT (StrLen (NewString) * sizeof (CHAR16) <= Statement->StorageWidth);
if (StrLen (NewString) * sizeof (CHAR16) <= Statement->StorageWidth) {
+ ZeroMem (Statement->BufferValue, Statement->StorageWidth);
CopyMem (Statement->BufferValue, NewString, StrSize (NewString));
} else {
CopyMem (Statement->BufferValue, NewString, Statement->StorageWidth);