Revision: 19552
          http://sourceforge.net/p/edk2/code/19552
Author:   jiaxinwu
Date:     2015-12-25 08:10:37 +0000 (Fri, 25 Dec 2015)
Log Message:
-----------
NetworkPkg: Fix suspicious dereference of pointer before NULL check

This patch is used to fix suspicious dereference of pointer before
NULL check in IScsiDxe driver.

Cc: Ye Ting <[email protected]>
Cc: Fu Siyuan <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <[email protected]>
Reviewed-by: Ye Ting <[email protected]>

Modified Paths:
--------------
    trunk/edk2/NetworkPkg/IScsiDxe/IScsiDriver.c

Modified: trunk/edk2/NetworkPkg/IScsiDxe/IScsiDriver.c
===================================================================
--- trunk/edk2/NetworkPkg/IScsiDxe/IScsiDriver.c        2015-12-25 06:50:55 UTC 
(rev 19551)
+++ trunk/edk2/NetworkPkg/IScsiDxe/IScsiDriver.c        2015-12-25 08:10:37 UTC 
(rev 19552)
@@ -105,7 +105,8 @@
   //
   // Check any AIP instances exist in system.
   //
-  AipHandleCount = 0;
+  AipHandleCount  = 0;
+  AipHandleBuffer = NULL;
   Status = gBS->LocateHandleBuffer (
                   ByProtocol,
                   &gEfiAdapterInformationProtocolGuid,
@@ -117,6 +118,8 @@
     return EFI_NOT_FOUND;
   }
 
+  ASSERT (AipHandleBuffer != NULL);
+
   InfoBlock = NULL;
 
   for (AipIndex = 0; AipIndex < AipHandleCount; AipIndex++) {


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to