summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-04-13 03:13:13 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-04-13 03:13:13 +0000
commit3a530010ec37a3a93bea01614b4a6f153340ceda (patch)
tree4a4f65ba66efdf55e63f11f536133731fec1bc55
parent6878e7a7be6a29da75fca61ba42681fc64a3fdf3 (diff)
downloadedk2-platforms-3a530010ec37a3a93bea01614b4a6f153340ceda.tar.xz
Do not assert in HiiBlockToConfig function when an invalid format of ConfigRequest is inputed, just return error.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11526 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
index e51de1371a..30f602d30f 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
@@ -453,8 +453,9 @@ GetValueOfNumber (
UINTN Index;
CHAR16 TemStr[2];
- ASSERT (StringPtr != NULL && Number != NULL && Len != NULL);
- ASSERT (*StringPtr != L'\0');
+ if (StringPtr == NULL || *StringPtr == L'\0' || Number == NULL || Len == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
Buf = NULL;
@@ -3103,7 +3104,7 @@ HiiBlockToConfig (
// Get Offset
//
Status = GetValueOfNumber (StringPtr, &TmpBuffer, &Length);
- if (Status == EFI_OUT_OF_RESOURCES) {
+ if (EFI_ERROR (Status)) {
*Progress = ConfigRequest;
goto Exit;
}
@@ -3127,7 +3128,7 @@ HiiBlockToConfig (
// Get Width
//
Status = GetValueOfNumber (StringPtr, &TmpBuffer, &Length);
- if (Status == EFI_OUT_OF_RESOURCES) {
+ if (EFI_ERROR (Status)) {
*Progress = ConfigRequest;
goto Exit;
}
@@ -3394,7 +3395,7 @@ HiiConfigToBlock (
// Get Width
//
Status = GetValueOfNumber (StringPtr, &TmpBuffer, &Length);
- if (Status == EFI_OUT_OF_RESOURCES) {
+ if (EFI_ERROR (Status)) {
*Progress = ConfigResp;
goto Exit;
}