mirror of https://github.com/acidanthera/audk.git
Add check code to avoid access violation.
Signed-off-by: ydong10 Reviewed-by: jcarsey git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11873 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
1ef41207dc
commit
72c8a89a65
|
@ -64,6 +64,10 @@ FindHiiHandleViaDevPath(
|
|||
return (Status);
|
||||
}
|
||||
|
||||
if (HandleBuffer == NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
for (LoopVariable = 0 ; LoopVariable < (HandleBufferSize/sizeof(HandleBuffer[0])) && *HiiHandle == NULL ; LoopVariable++) {
|
||||
MainBufferSize = 0;
|
||||
MainBuffer = NULL;
|
||||
|
|
Loading…
Reference in New Issue