]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Fix copy load option error.
authorEric Dong <eric.dong@intel.com>
Tue, 22 Oct 2013 01:14:54 +0000 (01:14 +0000)
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 22 Oct 2013 01:14:54 +0000 (01:14 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14795 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Application/Shell/ShellParametersProtocol.c

index 067f6b7cf5ea6b69609daa3886b21614519c4d85..2f8c626b010d4dd64188d603a1d08de989d9bf4f 100644 (file)
@@ -2,7 +2,7 @@
   Member functions of EFI_SHELL_PARAMETERS_PROTOCOL and functions for creation,\r
   manipulation, and initialization of EFI_SHELL_PARAMETERS_PROTOCOL.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2013, 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
@@ -313,9 +313,7 @@ CreatePopulateInstallShellParametersProtocol (
     FullCommandLine = AllocateZeroPool(Size);\r
   }\r
   if (FullCommandLine != NULL) {\r
-    if (LoadedImage->LoadOptionsSize != 0){\r
-      StrCpy(FullCommandLine, LoadedImage->LoadOptions);\r
-    }\r
+    CopyMem (FullCommandLine, LoadedImage->LoadOptions, LoadedImage->LoadOptionsSize);\r
     //\r
     // Populate Argc and Argv\r
     //\r