mirror of https://github.com/acidanthera/audk.git
Refine code to make code run more safely.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11143 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
96756716c0
commit
2349cf6f63
|
@ -1395,6 +1395,10 @@ Returns:
|
|||
return EFI_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
||||
if (ConfigHdr == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
*StrBufferLen = BufferSize;
|
||||
|
||||
StrPtr = ConfigHdr;
|
||||
|
|
|
@ -930,7 +930,7 @@ Returns:
|
|||
// Try to get the PEI version of ReportStatusCode.
|
||||
//
|
||||
Status = GetPeiProtocol (&gEfiStatusCodeRuntimeProtocolGuid, (VOID **) &gReportStatusCode);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR (Status) || (gReportStatusCode == NULL)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue