]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/EfiRom: Fix a segmentation fault from vsprintf()/vfprintf()
authorYonghong Zhu <yonghong.zhu@intel.com>
Wed, 19 Jul 2017 02:57:11 +0000 (10:57 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Tue, 1 Aug 2017 02:52:01 +0000 (10:52 +0800)
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=534
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/EfiRom/EfiRom.c

index c58c1523e95a5368db4f43217219399faaa71534..84322e3df10d17bffc610bc391f055cbd1df1923 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Utility program to create an EFI option ROM image from binary and EFI PE32 files.\r
 \r
-Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available \r
 under the terms and conditions of the BSD License which accompanies this \r
 distribution.  The full text of the license may be found at\r
@@ -242,7 +242,7 @@ Returns:
   // Try to open the input file\r
   //\r
   if ((InFptr = fopen (LongFilePath (InFile->FileName), "rb")) == NULL) {\r
-    Error (NULL, 0, 0001, "Error opening file", InFile->FileName);\r
+    Error (NULL, 0, 0001, "Error opening file", "%s", InFile->FileName);\r
     return STATUS_ERROR;\r
   }\r
   //\r
@@ -1262,7 +1262,7 @@ Returns:
   //\r
   // Copyright declaration\r
   // \r
-  fprintf (stdout, "Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.\n\n");\r
+  fprintf (stdout, "Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.\n\n");\r
 \r
   //\r
   // Details Option\r