From bec55c33c77253cd71773cca8b4f15b9f99b2b14 Mon Sep 17 00:00:00 2001 From: Zhang Lubo Date: Mon, 1 Feb 2016 11:29:57 +0800 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 Cc: Ye Ting Cc: Wu Jiaxin Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo Reviewed-by: Siyuan Fu Reviewed-by: Jiaxin Wu --- 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 6d39437252..8003f31491 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c @@ -2073,7 +2073,7 @@ PxeBcDhcp6Sarr ( 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