[edk2] [PATCH] MdeModulePkg/DxeCore: Add check to ensure no possible NULL ptr deref

Hao Wu posted 1 patch 6 years, 7 months ago
Failed in applying to current master (apply log)
MdeModulePkg/Core/Dxe/Hand/Handle.c | 1 +
1 file changed, 1 insertion(+)
[edk2] [PATCH] MdeModulePkg/DxeCore: Add check to ensure no possible NULL ptr deref
Posted by Hao Wu 6 years, 7 months ago
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 MdeModulePkg/Core/Dxe/Hand/Handle.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MdeModulePkg/Core/Dxe/Hand/Handle.c b/MdeModulePkg/Core/Dxe/Hand/Handle.c
index 3ed187b279..2db441725c 100644
--- a/MdeModulePkg/Core/Dxe/Hand/Handle.c
+++ b/MdeModulePkg/Core/Dxe/Hand/Handle.c
@@ -1178,6 +1178,7 @@ Done:
       // EFI_ALREADY_STARTED is not an error for bus driver.
       // Return the corresponding protocol interface.
       //
+      ASSERT (Prot != NULL);
       *Interface = Prot->Interface;
     } else if (Status == EFI_UNSUPPORTED) {
       //
-- 
2.12.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] MdeModulePkg/DxeCore: Add check to ensure no possible NULL ptr deref
Posted by Zeng, Star 6 years, 7 months ago
Reviewed-by: Star Zeng <star.zeng@intel.com>

-----Original Message-----
From: Wu, Hao A 
Sent: Monday, September 25, 2017 9:51 AM
To: edk2-devel@lists.01.org
Cc: Wu, Hao A <hao.a.wu@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: [PATCH] MdeModulePkg/DxeCore: Add check to ensure no possible NULL ptr deref

Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 MdeModulePkg/Core/Dxe/Hand/Handle.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MdeModulePkg/Core/Dxe/Hand/Handle.c b/MdeModulePkg/Core/Dxe/Hand/Handle.c
index 3ed187b279..2db441725c 100644
--- a/MdeModulePkg/Core/Dxe/Hand/Handle.c
+++ b/MdeModulePkg/Core/Dxe/Hand/Handle.c
@@ -1178,6 +1178,7 @@ Done:
       // EFI_ALREADY_STARTED is not an error for bus driver.
       // Return the corresponding protocol interface.
       //
+      ASSERT (Prot != NULL);
       *Interface = Prot->Interface;
     } else if (Status == EFI_UNSUPPORTED) {
       //
-- 
2.12.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel