From 3c8b6a5479558ccf8c41535107b3c895ee7aab2c Mon Sep 17 00:00:00 2001 From: Qiu Shumin Date: Wed, 16 Dec 2015 03:18:02 +0000 Subject: ShellPkg: Fix the 'bcfg' command ASSERT when use some invalid parameters. 'bcfg boot mv xx yy' command will ASSET when xx is larger than the count of boot options. This patch correct the order of ShellPrintHiiEx parameters to fix the bugs. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin Reviewed-by: Jaben Carsey git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19295 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c') diff --git a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c index eeee055cdb..142504a72d 100644 --- a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c +++ b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c @@ -2,7 +2,7 @@ Main file for BCFG command. (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.
- Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2015, 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 @@ -1379,7 +1379,7 @@ ShellCommandRunBcfg ( Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE); CurrentOperation.Number1 = (UINT16)Intermediate; if (CurrentOperation.Number1 >= Count){ - ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), L"bcfg", gShellBcfgHiiHandle, Count); + ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count); ShellStatus = SHELL_INVALID_PARAMETER; } else { CurrentParam = ShellCommandLineGetRawValue(Package, ++ParamNumber); -- cgit v1.2.3