summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellLevel2CommandsLib/Vol.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library/UefiShellLevel2CommandsLib/Vol.c')
-rw-r--r--ShellPkg/Library/UefiShellLevel2CommandsLib/Vol.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Vol.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Vol.c
index 9300d5e..4b6d2ea 100644
--- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Vol.c
+++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Vol.c
@@ -1,7 +1,7 @@
/** @file
Main file for vol shell level 2 function.
- Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
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
@@ -101,7 +101,7 @@ HandleVol(
ASSERT(SysInfo != NULL);
if (Delete) {
- StrCpy ((CHAR16 *) SysInfo->VolumeLabel, L"");
+ *((CHAR16 *) SysInfo->VolumeLabel) = CHAR_NULL;
SysInfo->Size = SIZE_OF_EFI_FILE_SYSTEM_INFO + StrSize(SysInfo->VolumeLabel);
Status = EfiFpHandle->SetInfo(
EfiFpHandle,
@@ -119,7 +119,7 @@ HandleVol(
}
}
if (SysInfo != NULL) {
- StrCpy ((CHAR16 *) SysInfo->VolumeLabel, Name);
+ StrnCpy ((CHAR16 *) SysInfo->VolumeLabel, Name, (Size1 > Size2?Size1/sizeof(CHAR16):Size2/sizeof(CHAR16))-1);
SysInfo->Size = SIZE_OF_EFI_FILE_SYSTEM_INFO + Size1;
Status = EfiFpHandle->SetInfo(
EfiFpHandle,