Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a...@intel.com> Reviewed-by: Liming Gao <liming....@intel.com> Reviewed-by: Jaben Carsey <jaben.car...@intel.com> --- IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c index 63b0775..9a9503e 100644 --- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c +++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c @@ -2,7 +2,7 @@ Mde UEFI library API implementation. Print to StdErr or ConOut defined in EFI_SYSTEM_TABLE - Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2007 - 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 @@ -754,16 +754,12 @@ CatVSPrint ( SizeRequired = sizeof(CHAR16) + (CharactersRequired * sizeof(CHAR16)); } - BufferToReturn = AllocateZeroPool(SizeRequired); + BufferToReturn = AllocateCopyPool(SizeRequired, String); if (BufferToReturn == NULL) { return NULL; } - if (String != NULL) { - StrCpy(BufferToReturn, String); - } - UnicodeVSPrint(BufferToReturn + StrLen(BufferToReturn), (CharactersRequired+1) * sizeof(CHAR16), FormatString, Marker); ASSERT(StrSize(BufferToReturn)==SizeRequired); -- 1.9.5.msysgit.0 ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel