summaryrefslogtreecommitdiff
path: root/ShellPkg
diff options
context:
space:
mode:
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2013-04-18 16:05:59 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2013-04-18 16:05:59 +0000
commit0290177adf73b36bc76f888e861da5c15e21d5d4 (patch)
treeb6ca04a061c6604e800dfdf43770ae5531079397 /ShellPkg
parent93723244c8e1fe78ea2b0a7402548bfd07765d50 (diff)
downloadedk2-platforms-0290177adf73b36bc76f888e861da5c15e21d5d4.tar.xz
ShellPkg: explicitly prevent dereferencing pointer
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
Diffstat (limited to 'ShellPkg')
-rw-r--r--ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c2
1 files changed, 1 insertions, 1 deletions
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
//