summaryrefslogtreecommitdiff
path: root/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c
diff options
context:
space:
mode:
authorhhuan13 <hhuan13@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-21 05:17:50 +0000
committerhhuan13 <hhuan13@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-21 05:17:50 +0000
commit648f98d15b5811ff9cf649bda8b762d50b735798 (patch)
tree07f5dd7fd3eb14ea8703581ccd22c55b52922091 /SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c
parent378175d2584ab0d52922308f6a18e710a36152ef (diff)
downloadedk2-platforms-648f98d15b5811ff9cf649bda8b762d50b735798.tar.xz
1. Enhance AuthVar driver to avoid process corrupted certificate input.
Signed-off-by: hhuan13 Reviewed-by: ftian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12398 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c')
-rw-r--r--SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c b/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c
index 136bafefec..df8b30a63e 100644
--- a/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c
+++ b/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c
@@ -199,7 +199,9 @@ UpdateVariableStore (
// Check if the Data is Volatile.
//
if (!Volatile) {
- ASSERT (Fvb != NULL);
+ if (Fvb == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
Status = Fvb->GetPhysicalAddress(Fvb, &FvVolHdr);
ASSERT_EFI_ERROR (Status);
@@ -1048,7 +1050,9 @@ VariableGetBestLanguage (
CONST CHAR8 *Supported;
CHAR8 *Buffer;
- ASSERT (SupportedLanguages != NULL);
+ if (SupportedLanguages == NULL) {
+ return NULL;
+ }
VA_START (Args, Iso639Language);
while ((Language = VA_ARG (Args, CHAR8 *)) != NULL) {