From b5bd6387d225dfef9a693982cabccd37fcdd1fb7 Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Wed, 19 Jul 2017 10:58:34 +0800 Subject: BaseTools/EfiLdrImage: Fix a segmentation fault from vfprintf() Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=533 Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c b/BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c index a46ecf827f..5368d22360 100644 --- a/BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c +++ b/BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c @@ -6,7 +6,7 @@ FILE := EFILDR_HEADER + The order of EFILDR_IMAGE is same as the order of placing PeImageFileContent. -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2017, 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 @@ -84,7 +84,7 @@ Usage ( { printf ("Usage: EfiLdrImage -o OutImage LoaderImage PeImage1 PeImage2 ... PeImageN\n"); printf ("%s Version %d.%d Build %s\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION); - printf ("Copyright (c) 1999-2016 Intel Corporation. All rights reserved.\n"); + printf ("Copyright (c) 1999-2017 Intel Corporation. All rights reserved.\n"); printf ("\n The EfiLdrImage tool is used to combine PE files into EFILDR image with Efi loader header.\n"); } @@ -221,7 +221,7 @@ Returns: if (strlen(argv[0]) > 2) { Status = CountVerboseLevel (&argv[0][2], strlen(argv[0]) - 2, &VerboseLevel); if (EFI_ERROR (Status)) { - Error (NULL, 0, 1003, "Invalid option value", argv[0]); + Error (NULL, 0, 1003, "Invalid option value", "%s", argv[0]); return STATUS_ERROR; } } -- cgit v1.2.3