]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Fix the 'bcfg' command ASSERT when use some invalid parameters.
authorQiu Shumin <shumin.qiu@intel.com>
Wed, 16 Dec 2015 03:18:02 +0000 (03:18 +0000)
committershenshushi <shenshushi@Edk2>
Wed, 16 Dec 2015 03:18:02 +0000 (03:18 +0000)
'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 <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19295 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c

index eeee055cdb1b19e2f7655cc39693ecc5906d22ae..142504a72dbe0793ff446bb58bbeac3e24caf60c 100644 (file)
@@ -2,7 +2,7 @@
   Main file for BCFG command.\r
 \r
   (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -1379,7 +1379,7 @@ ShellCommandRunBcfg (
             Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE);\r
             CurrentOperation.Number1     = (UINT16)Intermediate;\r
             if (CurrentOperation.Number1 >= Count){\r
-              ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), L"bcfg", gShellBcfgHiiHandle, Count);  \r
+              ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count);  \r
               ShellStatus = SHELL_INVALID_PARAMETER;\r
             } else {\r
               CurrentParam = ShellCommandLineGetRawValue(Package, ++ParamNumber);\r