From 695e4c49bed6754f67aaf304edaecd3f65dca5e8 Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Mon, 13 Feb 2017 11:27:22 +0800 Subject: [PATCH] MdeModulePkg/PrintLib: Add deprecated flag for APIs [A|U]ValueToString Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu Reviewed-by: Liming Gao --- .../Library/DxePrintLibPrint2Protocol/PrintLib.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c b/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c index 589d4db619..434736f974 100644 --- a/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c +++ b/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c @@ -598,7 +598,11 @@ UnicodeSPrintAsciiFormat ( return NumberOfPrinted; } +#ifndef DISABLE_NEW_DEPRECATED_INTERFACES + /** + [ATTENTION] This function is deprecated for security reason. + Converts a decimal value to a Null-terminated Unicode string. Converts the decimal number specified by Value to a Null-terminated Unicode @@ -665,6 +669,8 @@ UnicodeValueToString ( return StrnLenS (Buffer, BufferSize / sizeof (CHAR16)); } +#endif + /** Converts a decimal value to a Null-terminated Unicode string. @@ -1071,7 +1077,11 @@ AsciiSPrintUnicodeFormat ( } +#ifndef DISABLE_NEW_DEPRECATED_INTERFACES + /** + [ATTENTION] This function is deprecated for security reason. + Converts a decimal value to a Null-terminated ASCII string. Converts the decimal number specified by Value to a Null-terminated ASCII string @@ -1137,6 +1147,8 @@ AsciiValueToString ( return AsciiStrnLenS (Buffer, BufferSize / sizeof (CHAR8)); } +#endif + /** Converts a decimal value to a Null-terminated Ascii string. -- 2.39.2