diff options
author | Star Zeng <star.zeng@intel.com> | 2018-08-02 09:14:59 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2018-08-03 08:29:24 +0800 |
commit | df4c129833ab5a94a4920620938e32979cf2f241 (patch) | |
tree | 7b70ae86ce037883d211622698586141aa6c0c75 /MdeModulePkg/Library/DxeCapsuleLibFmp | |
parent | 6fb8b96d9bab1281f02081a1871379f771edc0f1 (diff) | |
download | edk2-df4c129833ab5a94a4920620938e32979cf2f241.tar.gz |
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/Library/DxeCapsuleLibFmp')
-rw-r--r-- | MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 4 |
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,
|