From: Dandan Bi <dandan.bi@intel.com>
To: edk2-devel@lists.01.org
Cc: Liming Gao <liming.gao@intel.com>,
Eric Dong <eric.dong@intel.com>,
Jiewen Yao <jiewen.yao@intel.com>
Subject: [patch 3/4] MdeModulePkg: Clear the buffer after using it
Date: Thu, 17 Nov 2016 10:24:06 +0800 [thread overview]
Message-ID: <1479349447-46344-4-git-send-email-dandan.bi@intel.com> (raw)
In-Reply-To: <1479349447-46344-1-git-send-email-dandan.bi@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c | 3 ++-
MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c
index 95bd5f0..557e8ec 100644
--- a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c
+++ b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c
@@ -905,11 +905,12 @@ PasswordProcess (
CreateDialog (&Key, gEmptyString, gConfirmError, gPressEnter, gEmptyString, NULL);
} while (Key.UnicodeChar != CHAR_CARRIAGE_RETURN);
Status = EFI_INVALID_PARAMETER;
}
-
+ ZeroMem (TempString, (Maximum + 1) * sizeof (CHAR16));
+ ZeroMem (StringPtr, (Maximum + 1) * sizeof (CHAR16));
FreePool (TempString);
FreePool (StringPtr);
return Status;
}
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
index 0c5d1b4..aa0bd22 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
@@ -1614,10 +1614,11 @@ 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
//
if ((Statement->QuestionFlags & EFI_IFR_FLAG_CALLBACK) != 0) {
--
1.9.5.msysgit.1
next prev parent reply other threads:[~2016-11-17 2:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-17 2:24 [patch 0/4] MdeModulePkg: Don't support password without interactive flag Dandan Bi
2016-11-17 2:24 ` [patch 1/4] MdeModulePkg/DisplayEngine: Popup dialogue when password is not supported Dandan Bi
2016-11-17 2:24 ` [patch 2/4] MdeModulePkg/SetupBrowser:Don't support password without interactive flag Dandan Bi
2016-11-17 2:24 ` Dandan Bi [this message]
2016-11-17 2:24 ` [patch 4/4] MdeModulePkg/DriverSampleDxe: Remove the non-interactive password Dandan Bi
2016-11-24 5:15 ` [patch 0/4] MdeModulePkg: Don't support password without interactive flag Gao, Liming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1479349447-46344-4-git-send-email-dandan.bi@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox