]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: explicitly prevent dereferencing pointer
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 18 Apr 2013 16:05:59 +0000 (16:05 +0000)
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 18 Apr 2013 16:05:59 +0000 (16:05 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
reviewed-by: Erik Bjorge <Erik.c.Bjorge@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14291 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c

index eb2b2cc5f35dc83a48bf25e44d11868faa470f22..876cb9d3ef8c0cacd0e99c60e88356ed8103b5e4 100644 (file)
@@ -219,7 +219,7 @@ CopySingleFile(
       //\r
       //check if enough space available on destination drive to complete copy\r
       //\r
-      if (DestVolumeInfo->FreeSpace < SourceFileSize) {\r
+      if (DestVolumeInfo!= NULL && (DestVolumeInfo->FreeSpace < SourceFileSize)) {\r
         //\r
         //not enough space on destination directory to copy file\r
         //\r