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>
This commit is contained in:
Star Zeng 2018-08-02 09:14:59 +08:00
parent 6fb8b96d9b
commit df4c129833
1 changed files with 3 additions and 1 deletions

View File

@ -1225,7 +1225,9 @@ ProcessFmpCapsuleImage (
&HandleBuffer,
&ResetRequiredBuffer
);
if (EFI_ERROR(Status)) {
if (EFI_ERROR(Status) ||
(HandleBuffer == NULL) ||
(ResetRequiredBuffer == NULL)) {
NotReady = TRUE;
RecordFmpCapsuleStatus (
NULL,