MdePkg: Check input Ptrs in GetSectionFromAnyFvByFileType

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 <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Dandan Bi 2018-11-19 09:50:22 +08:00 committed by Liming Gao
parent d8e702693a
commit 59222fe90b
1 changed files with 3 additions and 0 deletions

View File

@ -253,6 +253,9 @@ GetSectionFromAnyFvByFileType (
EFI_FV_FILE_ATTRIBUTES Attributes;
EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
ASSERT (Buffer != NULL);
ASSERT (Size != NULL);
//
// Locate all available FVs.
//