audk/MdeModulePkg/Library/DxePrintLibPrint2Protocol
Hao Wu 7c6075e254 MdeModulePkg/PrintLib: Add missing return status check for Print APIs
https://bugzilla.tianocore.org/show_bug.cgi?id=307

For the following APIs in PrintLib instance
MdeModulePkg\Library\DxePrintLibPrint2Protocol:
UnicodeVSPrint
UnicodeSPrint
UnicodeVSPrintAsciiFormat
UnicodeSPrintAsciiFormat
AsciiVSPrint
AsciiSPrint
AsciiVSPrintUnicodeFormat
AsciiSPrintUnicodeFormat

The internal function DxePrintLibPrint2ProtocolVaListToBaseList() will be
called to convert a VA_LIST to a BASE_LIST. However, those APIs miss
checking the return value of the internal function.

This commit adds codes to check the return value. If the VA_LIST fails to
be converted to a BASE_LIST, those PrintLib APIs will return 0 and leave
the output 'StartOfBuffer' unmodified.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2017-01-03 16:32:52 +08:00
..
DxePrintLibPrint2Protocol.inf MdeModulePkg: INF/DEC file updates to EDK II packages 2014-08-28 06:34:06 +00:00
DxePrintLibPrint2Protocol.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
PrintLib.c MdeModulePkg/PrintLib: Add missing return status check for Print APIs 2017-01-03 16:32:52 +08:00