summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Application/Shell/ShellEnvVar.c
diff options
context:
space:
mode:
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-03-25 22:23:05 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-03-25 22:23:05 +0000
commit733f138d84a25a5993bc32ffe016c364daba686c (patch)
tree9e382ca28b013cfb59e307a042fef0282c01e396 /ShellPkg/Application/Shell/ShellEnvVar.c
parentdc56f067d253fbdb1b2199676839e5dc7c5f037b (diff)
downloadedk2-733f138d84a25a5993bc32ffe016c364daba686c.tar.gz
edk2-733f138d84a25a5993bc32ffe016c364daba686c.tar.bz2
edk2-733f138d84a25a5993bc32ffe016c364daba686c.zip
console logger - support disabling the console out.
console wrapper - comment fixes. file handle wrappers - allow for creation of layers of file interfaces to automatically convert ASCII to UCS-2. shell - add CTRL-S support and change how searching for startup.nsh. shellenvvar - zero the memory allocations. shall man parser - input verification on the help text. shellparameters protocol - input redirection verification enhanced, leave ^ behind when not used. shell protocol - remove ASSERTs, fixed GetDeviceName, allow mapping of BlockIO devices, and enhanced key monitoring for CTRL-S (now CTRL-S and CTRL-C). git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11440 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Application/Shell/ShellEnvVar.c')
-rw-r--r--ShellPkg/Application/Shell/ShellEnvVar.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ShellPkg/Application/Shell/ShellEnvVar.c b/ShellPkg/Application/Shell/ShellEnvVar.c
index 519181b56d..174a783830 100644
--- a/ShellPkg/Application/Shell/ShellEnvVar.c
+++ b/ShellPkg/Application/Shell/ShellEnvVar.c
@@ -1,7 +1,7 @@
/** @file
function declarations for shell environment functions.
- Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2011, 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
@@ -56,7 +56,7 @@ IsVolatileEnv (
&Size,
Buffer);
if (Status == EFI_BUFFER_TOO_SMALL) {
- Buffer = AllocatePool(Size);
+ Buffer = AllocateZeroPool(Size);
ASSERT(Buffer != NULL);
Status = gRT->GetVariable((CHAR16*)EnvVarName,
&gShellVariableGuid,
@@ -154,7 +154,7 @@ GetEnvironmentVariableList(
}
NameSize = (UINTN)MaxVarSize;
- VariableName = AllocatePool(NameSize);
+ VariableName = AllocateZeroPool(NameSize);
if (VariableName == NULL) {
return (EFI_OUT_OF_RESOURCES);
}
@@ -175,7 +175,7 @@ GetEnvironmentVariableList(
ValSize = 0;
Status = SHELL_GET_ENVIRONMENT_VARIABLE_AND_ATTRIBUTES(VariableName, &VarList->Atts, &ValSize, VarList->Val);
if (Status == EFI_BUFFER_TOO_SMALL){
- VarList->Val = AllocatePool(ValSize);
+ VarList->Val = AllocateZeroPool(ValSize);
if (VarList->Val == NULL) {
SHELL_FREE_NON_NULL(VarList);
Status = EFI_OUT_OF_RESOURCES;
@@ -184,7 +184,7 @@ GetEnvironmentVariableList(
}
}
if (!EFI_ERROR(Status) && VarList != NULL) {
- VarList->Key = AllocatePool(StrSize(VariableName));
+ VarList->Key = AllocateZeroPool(StrSize(VariableName));
if (VarList->Key == NULL) {
SHELL_FREE_NON_NULL(VarList->Val);
SHELL_FREE_NON_NULL(VarList);
@@ -312,7 +312,7 @@ SetEnvironmentVariables(
break;
}
ASSERT(StrStr(CurrentString, L"=") != NULL);
- Node = AllocatePool(sizeof(ENV_VAR_LIST));
+ Node = AllocateZeroPool(sizeof(ENV_VAR_LIST));
ASSERT(Node != NULL);
Node->Key = AllocateZeroPool((StrStr(CurrentString, L"=") - CurrentString + 1) * sizeof(CHAR16));
ASSERT(Node->Key != NULL);