summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2018-11-19 09:50:22 +0800
committerLiming Gao <liming.gao@intel.com>2018-11-21 13:01:03 +0800
commit59222fe90bc93af9afd5204dbd75fd434820018c (patch)
tree5c4992c0c47ddd381131ef1cb753a2112c10d905 /MdePkg/Library
parentd8e702693a8c292220131dc4234a36e2c9fff614 (diff)
downloadedk2-59222fe90bc93af9afd5204dbd75fd434820018c.tar.gz
edk2-59222fe90bc93af9afd5204dbd75fd434820018c.tar.bz2
edk2-59222fe90bc93af9afd5204dbd75fd434820018c.zip
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>
Diffstat (limited to 'MdePkg/Library')
-rw-r--r--MdePkg/Library/DxeServicesLib/DxeServicesLib.c3
1 files changed, 3 insertions, 0 deletions
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
@@ -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.
//