From 54c9a68d9c95325f784c27f09de7aecd2a7322b2 Mon Sep 17 00:00:00 2001 From: jcarsey Date: Thu, 14 Feb 2013 01:02:15 +0000 Subject: [PATCH] ShellPkg: fix string truncation. 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@14129 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c index 00b51b4111..5dcb294196 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c @@ -1,7 +1,7 @@ /** @file Main file for cp shell level 2 function. - Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -147,7 +147,7 @@ CopySingleFile( StrnCatGrow(&TempName, &Size, Source, 0); StrnCatGrow(&TempName, &Size, L"\\*", 0); ShellOpenFileMetaArg((CHAR16*)TempName, EFI_FILE_MODE_READ, &List); - TempName = NULL; + *TempName = CHAR_NULL; StrnCatGrow(&TempName, &Size, Dest, 0); StrnCatGrow(&TempName, &Size, L"\\", 0); ShellStatus = ValidateAndCopyFiles(List, TempName, SilentMode, TRUE, Resp); -- 2.39.2