Revision: 16410
          http://sourceforge.net/p/edk2/code/16410
Author:   shenshushi
Date:     2014-11-20 01:31:36 +0000 (Thu, 20 Nov 2014)
Log Message:
-----------
ShellPkg: Code refine to avoid potential dereference of pointer.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin....@intel.com>
Reviewed-by: Jaben Carsey <jaben.car...@intel.com>

Modified Paths:
--------------
    trunk/edk2/ShellPkg/Library/UefiShellLib/UefiShellLib.c

Modified: trunk/edk2/ShellPkg/Library/UefiShellLib/UefiShellLib.c
===================================================================
--- trunk/edk2/ShellPkg/Library/UefiShellLib/UefiShellLib.c     2014-11-20 
01:23:49 UTC (rev 16409)
+++ trunk/edk2/ShellPkg/Library/UefiShellLib/UefiShellLib.c     2014-11-20 
01:31:36 UTC (rev 16410)
@@ -2078,7 +2078,7 @@
           ASSERT(GetItemValue == 0);
           break;
       }
-    } else if (GetItemValue != 0 && !InternalIsFlag(Argv[LoopCounter], 
AlwaysAllowNumbers, (CONST BOOLEAN)(CurrentItemPackage->Type == 
TypeTimeValue))) {
+    } else if (GetItemValue != 0 && CurrentItemPackage != NULL && 
!InternalIsFlag(Argv[LoopCounter], AlwaysAllowNumbers, (CONST 
BOOLEAN)(CurrentItemPackage->Type == TypeTimeValue))) {
       ASSERT(CurrentItemPackage != NULL);
       //
       // get the item VALUE for a previous flag


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to