Revision: 19415
          http://sourceforge.net/p/edk2/code/19415
Author:   vanjeff
Date:     2015-12-18 07:42:43 +0000 (Fri, 18 Dec 2015)
Log Message:
-----------
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.

(Sync patch r19295 from main trunk.)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <[email protected]>
Reviewed-by: Jaben Carsey <[email protected]>

Revision Links:
--------------
    http://sourceforge.net/p/edk2/code/19295

Modified Paths:
--------------
    
branches/UDK2015/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c

Modified: 
branches/UDK2015/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
===================================================================
--- 
branches/UDK2015/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
 2015-12-18 07:42:12 UTC (rev 19414)
+++ 
branches/UDK2015/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
 2015-12-18 07:42:43 UTC (rev 19415)
@@ -2,7 +2,7 @@
   Main file for BCFG command.
 
   (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.<BR>
-  Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2010 - 2015, 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
@@ -1379,7 +1379,7 @@
             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);


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to