summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2018-08-02 09:14:59 +0800
committerStar Zeng <star.zeng@intel.com>2018-08-03 08:29:24 +0800
commitdf4c129833ab5a94a4920620938e32979cf2f241 (patch)
tree7b70ae86ce037883d211622698586141aa6c0c75 /MdeModulePkg
parent6fb8b96d9bab1281f02081a1871379f771edc0f1 (diff)
downloadedk2-df4c129833ab5a94a4920620938e32979cf2f241.tar.gz
edk2-df4c129833ab5a94a4920620938e32979cf2f241.tar.bz2
edk2-df4c129833ab5a94a4920620938e32979cf2f241.zip
MdeModulePkg DxeCapsuleLibFmp: Add NULL check to the return buffers
Add NULL check to the return buffers from GetFmpHandleBufferByType(). Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Hao A Wu <Hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Hao A Wu <Hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
index 85848279d4..91c6849a46 100644
--- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
+++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
@@ -1225,7 +1225,9 @@ ProcessFmpCapsuleImage (
&HandleBuffer,
&ResetRequiredBuffer
);
- if (EFI_ERROR(Status)) {
+ if (EFI_ERROR(Status) ||
+ (HandleBuffer == NULL) ||
+ (ResetRequiredBuffer == NULL)) {
NotReady = TRUE;
RecordFmpCapsuleStatus (
NULL,