MdeModulePkg: Fix potential buffer overflow issues.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17472 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1561,12 +1561,15 @@ IfrMatch2 (
|
||||
&BufferSize,
|
||||
HandleBuffer);
|
||||
|
||||
} else if (EFI_ERROR (Status)) {
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
Result->Type = EFI_IFR_TYPE_UNDEFINED;
|
||||
Status = EFI_SUCCESS;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
ASSERT (HandleBuffer != NULL);
|
||||
for ( Index = 0; Index < BufferSize / sizeof(EFI_HANDLE); Index ++) {
|
||||
Status = gBS->HandleProtocol (
|
||||
HandleBuffer[Index],
|
||||
|
Reference in New Issue
Block a user