]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/EfiLdrImage: Fix a segmentation fault from vfprintf()
authorYonghong Zhu <yonghong.zhu@intel.com>
Wed, 19 Jul 2017 02:58:34 +0000 (10:58 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Tue, 1 Aug 2017 02:52:23 +0000 (10:52 +0800)
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=533
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c

index a46ecf827f462de16459e26a8ce3964ddbff5dcf..5368d22360ad2f7d020fed95456301f782369c21 100644 (file)
@@ -6,7 +6,7 @@ FILE := EFILDR_HEADER
         <PeImageFileContent> +\r
 The order of EFILDR_IMAGE is same as the order of placing PeImageFileContent.\r
   \r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, 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
@@ -84,7 +84,7 @@ Usage (
 {\r
   printf ("Usage: EfiLdrImage -o OutImage LoaderImage PeImage1 PeImage2 ... PeImageN\n");\r
   printf ("%s Version %d.%d Build %s\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);\r
-  printf ("Copyright (c) 1999-2016 Intel Corporation. All rights reserved.\n");\r
+  printf ("Copyright (c) 1999-2017 Intel Corporation. All rights reserved.\n");\r
   printf ("\n  The EfiLdrImage tool is used to combine PE files into EFILDR image with Efi loader header.\n");\r
 }\r
 \r
@@ -221,7 +221,7 @@ Returns:
       if (strlen(argv[0]) > 2) {\r
         Status = CountVerboseLevel (&argv[0][2], strlen(argv[0]) - 2, &VerboseLevel);\r
         if (EFI_ERROR (Status)) {\r
-          Error (NULL, 0, 1003, "Invalid option value", argv[0]);\r
+          Error (NULL, 0, 1003, "Invalid option value", "%s", argv[0]);\r
           return STATUS_ERROR;        \r
         }\r
       }\r