mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
6878e7a7be
commit
3a530010ec
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue