diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c index 95bd5f0919..557e8ecd94 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c @@ -907,7 +907,8 @@ PasswordProcess ( Status = EFI_INVALID_PARAMETER; } - + ZeroMem (TempString, (Maximum + 1) * sizeof (CHAR16)); + ZeroMem (StringPtr, (Maximum + 1) * sizeof (CHAR16)); FreePool (TempString); FreePool (StringPtr); diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c index 0c5d1b4018..aa0bd229ce 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c @@ -1616,6 +1616,7 @@ ProcessUserInput ( DeleteString(Statement->HiiValue.Value.string, gCurrentSelection->FormSet->HiiHandle); Statement->HiiValue.Value.string = UserInput->InputValue.Value.string; CopyMem (Statement->BufferValue, UserInput->InputValue.Buffer, (UINTN) UserInput->InputValue.BufferLen); + ZeroMem (UserInput->InputValue.Buffer, (UINTN) UserInput->InputValue.BufferLen); FreePool (UserInput->InputValue.Buffer); // // Two password match, send it to Configuration Driver