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
This commit is contained in:
hhuan13
2011-09-21 05:17:50 +00:00
parent 378175d258
commit 648f98d15b
3 changed files with 48 additions and 18 deletions

View File

@@ -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) {