public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdeModulePkg DxeCapsuleLibFmp: Add NULL check to the return buffers
@ 2018-08-02  1:16 Star Zeng
  2018-08-02  1:22 ` Wu, Hao A
  0 siblings, 1 reply; 2+ messages in thread
From: Star Zeng @ 2018-08-02  1:16 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Jiewen Yao, Hao A Wu

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>
---
 MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
index 85848279d44c..91c6849a4658 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,
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-02  1:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-02  1:16 [PATCH] MdeModulePkg DxeCapsuleLibFmp: Add NULL check to the return buffers Star Zeng
2018-08-02  1:22 ` Wu, Hao A

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox