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:32:05 +0800 |
commit | 6e4a19075679417b80ea198fd3a52489edb2bc04 (patch) | |
tree | 1d28707f8da7bd839092a2be50c418bb2fa8d7aa | |
parent | 83131575bef5d18e7c1acd7b8f8ee9095cbb4bb4 (diff) | |
download | edk2-6e4a19075679417b80ea198fd3a52489edb2bc04.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>
(cherry picked from commit df4c129833ab5a94a4920620938e32979cf2f241)
-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,
|