REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1337
In function GetSectionFromAnyFvByFileType, the input parameter "Buffer" and "size" should not be NULL, so add ASSERT here to avoid any checker report that the NULL pointer may be used. Cc: Michael D Kinney <[email protected]> Cc: Liming Gao <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <[email protected]> --- MdePkg/Library/DxeServicesLib/DxeServicesLib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MdePkg/Library/DxeServicesLib/DxeServicesLib.c b/MdePkg/Library/DxeServicesLib/DxeServicesLib.c index d4f366425f..e78d51cb92 100644 --- a/MdePkg/Library/DxeServicesLib/DxeServicesLib.c +++ b/MdePkg/Library/DxeServicesLib/DxeServicesLib.c @@ -251,10 +251,13 @@ GetSectionFromAnyFvByFileType ( UINTN Key; EFI_GUID NameGuid; EFI_FV_FILE_ATTRIBUTES Attributes; EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv; + ASSERT (Buffer != NULL); + ASSERT (Size != NULL); + // // Locate all available FVs. // HandleBuffer = NULL; Status = gBS->LocateHandleBuffer ( -- 2.18.0.windows.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

