Reviewed-by: Jiaxin Wu <jiaxin...@intel.com>

-----Original Message-----
From: Zhang, Lubo 
Sent: Tuesday, February 2, 2016 2:51 PM
To: edk2-devel@lists.01.org
Cc: Fu, Siyuan; Ye, Ting; Wu, Jiaxin
Subject: [patch] NetworkPkg: Fix suspicious dereference of pointer 'Mode.Ia'

This patch is used to fix suspicious dereference of pointer 'Mode.Ia'
before NULL check.

Cc: Fu Siyuan <siyuan...@intel.com>
Cc: Ye Ting <ting...@intel.com>
Cc: Wu Jiaxin <jiaxin...@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zh...@intel.com>
---
 NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c 
b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
index 6d39437..8003f31 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
@@ -2071,11 +2071,11 @@ PxeBcDhcp6Sarr (
   if (EFI_ERROR (Status)) {
     Dhcp6->Stop (Dhcp6);
     return Status;
   }
 
-  ASSERT (Mode.Ia->State == Dhcp6Bound);
+  ASSERT ((Mode.Ia != NULL) && (Mode.Ia->State == Dhcp6Bound));
   //
   // DHCP6 doesn't have an option to specify the router address on the subnet, 
the only way to get the
   // router address in IP6 is the router discovery mechanism (the RS and RA, 
which only be handled when
   // the IP policy is Automatic). So we just hold the station IP address here 
and leave the IP policy as
   // Automatic, until we get the server IP address. This could let IP6 driver 
finish the router discovery 
-- 
1.9.5.msysgit.1

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

Reply via email to