summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellInstall1CommandsLib/Bcfg.c
diff options
context:
space:
mode:
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2012-10-18 07:32:42 +0000
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2012-10-18 07:32:42 +0000
commit7714cf7d0d334cfe8b1463c8700ca652410c92a5 (patch)
treefcfe297202a3ab1d35a2e14971e24e1decb1fa3f /ShellPkg/Library/UefiShellInstall1CommandsLib/Bcfg.c
parentad481b0b99a36000c27aacaa5bff993c80c91622 (diff)
Fix a bug that BCFG creates Key#### variable bigger than it should be.
Signed-off-by: Ruiyu Ni<ruiyu.ni@intel.com> Reviewed-by: Eric Dong<eric.dong@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13862 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellInstall1CommandsLib/Bcfg.c')
-rw-r--r--ShellPkg/Library/UefiShellInstall1CommandsLib/Bcfg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ShellPkg/Library/UefiShellInstall1CommandsLib/Bcfg.c b/ShellPkg/Library/UefiShellInstall1CommandsLib/Bcfg.c
index 22f6c6f61..a7a10bf3b 100644
--- a/ShellPkg/Library/UefiShellInstall1CommandsLib/Bcfg.c
+++ b/ShellPkg/Library/UefiShellInstall1CommandsLib/Bcfg.c
@@ -857,7 +857,7 @@ BcfgAddOptInstall1(
// Now we know how many EFI_INPUT_KEY structs we need to attach to the end of the EFI_KEY_OPTION struct.
// Re-allocate with the added information.
//
- KeyOptionBuffer = AllocateCopyPool(sizeof(EFI_KEY_OPTION) + (sizeof(EFI_KEY_DATA) * KEY_OPTION_INPUT_KEY_COUNT (&NewKeyOption)), &NewKeyOption);
+ KeyOptionBuffer = AllocateCopyPool(sizeof(EFI_KEY_OPTION) + (sizeof(EFI_INPUT_KEY) * KEY_OPTION_INPUT_KEY_COUNT (&NewKeyOption)), &NewKeyOption);
if (KeyOptionBuffer == NULL) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_MEM), gShellInstall1HiiHandle);
ShellStatus = SHELL_OUT_OF_RESOURCES;
@@ -929,7 +929,7 @@ BcfgAddOptInstall1(
VariableName,
(EFI_GUID*)&gEfiGlobalVariableGuid,
EFI_VARIABLE_NON_VOLATILE|EFI_VARIABLE_BOOTSERVICE_ACCESS|EFI_VARIABLE_RUNTIME_ACCESS,
- sizeof(EFI_KEY_OPTION) + (sizeof(EFI_KEY_DATA) * KEY_OPTION_INPUT_KEY_COUNT (&NewKeyOption)),
+ sizeof(EFI_KEY_OPTION) + (sizeof(EFI_INPUT_KEY) * KEY_OPTION_INPUT_KEY_COUNT (&NewKeyOption)),
KeyOptionBuffer);
if (EFI_ERROR(Status)) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellInstall1HiiHandle, VariableName, Status);