Revision: 16161
          http://sourceforge.net/p/edk2/code/16161
Author:   shenshushi
Date:     2014-09-23 06:20:59 +0000 (Tue, 23 Sep 2014)
Log Message:
-----------
ShellPkg: Refine code style to avoid potential NullPointer dereference.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <[email protected]>
Reviewed-by: Ni Ruiyu <[email protected]>

Modified Paths:
--------------
    trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c
    trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c

Modified: trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c
===================================================================
--- trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c 2014-09-23 
01:32:56 UTC (rev 16160)
+++ trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c 2014-09-23 
06:20:59 UTC (rev 16161)
@@ -326,7 +326,9 @@
     } else {
       return SHELL_INVALID_PARAMETER;
     }
-  }  
+  }
+  
+  ASSERT (CleanFilePathStr != NULL);
 
   //
   // If we are trying to copy multiple files... make sure we got a directory 
for the target...

Modified: trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c
===================================================================
--- trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c 2014-09-23 
01:32:56 UTC (rev 16160)
+++ trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c 2014-09-23 
06:20:59 UTC (rev 16161)
@@ -289,6 +289,8 @@
     }
   }  
 
+  ASSERT (CleanFilePathStr != NULL);
+
   //
   // Get and validate the destination location
   //


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to