From 0290177adf73b36bc76f888e861da5c15e21d5d4 Mon Sep 17 00:00:00 2001 From: jcarsey Date: Thu, 18 Apr 2013 16:05:59 +0000 Subject: [PATCH] ShellPkg: explicitly prevent dereferencing pointer Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey reviewed-by: Erik Bjorge git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14291 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c index eb2b2cc5f3..876cb9d3ef 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c @@ -219,7 +219,7 @@ CopySingleFile( // //check if enough space available on destination drive to complete copy // - if (DestVolumeInfo->FreeSpace < SourceFileSize) { + if (DestVolumeInfo!= NULL && (DestVolumeInfo->FreeSpace < SourceFileSize)) { // //not enough space on destination directory to copy file // -- 2.39.2