]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: fix string truncation.
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 14 Feb 2013 01:02:15 +0000 (01:02 +0000)
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 14 Feb 2013 01:02:15 +0000 (01:02 +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@14129 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c

index 00b51b411197e34cf0aaa7a8097681998d684518..5dcb29419669491da4f897d955b41d18fbd2a473 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for cp shell level 2 function.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -147,7 +147,7 @@ CopySingleFile(
     StrnCatGrow(&TempName, &Size, Source, 0);\r
     StrnCatGrow(&TempName, &Size, L"\\*", 0);\r
     ShellOpenFileMetaArg((CHAR16*)TempName, EFI_FILE_MODE_READ, &List);\r
-    TempName = NULL;\r
+    *TempName = CHAR_NULL;\r
     StrnCatGrow(&TempName, &Size, Dest, 0);\r
     StrnCatGrow(&TempName, &Size, L"\\", 0);\r
     ShellStatus = ValidateAndCopyFiles(List, TempName, SilentMode, TRUE, Resp);\r