summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellBcfgCommandLib
diff options
context:
space:
mode:
authorTapan Shah <tapandshah@hp.com>2014-09-12 16:46:23 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2014-09-12 16:46:23 +0000
commitcfffccd9df1ed205721dd21038880a4fa72a5102 (patch)
treec63e3a53485f7a5a1b80a4ae9d4845fa4836039f /ShellPkg/Library/UefiShellBcfgCommandLib
parent84cc912aee71218ea8e4f5a0c597067e956dcd8f (diff)
downloadedk2-cfffccd9df1ed205721dd21038880a4fa72a5102.tar.gz
edk2-cfffccd9df1ed205721dd21038880a4fa72a5102.tar.bz2
edk2-cfffccd9df1ed205721dd21038880a4fa72a5102.zip
ShellPkg: Fix ASSERT when bcfg moving boot option with source location = total number of boot options
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hp.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16102 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellBcfgCommandLib')
-rw-r--r--ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
index d62b569ab3..a0cb2da0fe 100644
--- a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
+++ b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
@@ -1,6 +1,7 @@
/** @file
Main file for BCFG command.
+ Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2010 - 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
@@ -1353,7 +1354,7 @@ ShellCommandRunBcfg (
} else {
Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE);
CurrentOperation.Number1 = (UINT16)Intermediate;
- if (CurrentOperation.Number1 > Count){
+ if (CurrentOperation.Number1 >= Count){
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, Count);
ShellStatus = SHELL_INVALID_PARAMETER;
}
@@ -1371,7 +1372,7 @@ ShellCommandRunBcfg (
} else {
Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE);
CurrentOperation.Number1 = (UINT16)Intermediate;
- if (CurrentOperation.Number1 > Count){
+ if (CurrentOperation.Number1 >= Count){
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, Count);
ShellStatus = SHELL_INVALID_PARAMETER;
} else {