audk/MdeModulePkg
Hao Wu 213da0b540 MdeModulePkg/PrintLib: Avoid reading content beyond the format string
https://bugzilla.tianocore.org/show_bug.cgi?id=567

In functions DxePrintLibPrint2ProtocolVaListToBaseList() and
InternalPrintLibSPrintMarker(), when processing ASCII format strings, if
the format string walker pointer 'Format' is pointing at the end of the
format string (i.e. '\0'), the following expression:
*(Format + 1)
will read an undefined value.

Though this value won't affect the functionality, since it will be masked
by variable 'FormatMask':
(*(Format + 1) << 8)) & FormatMask
(FormatMask is 0xff for ASCII format string)

This commit adds additional logic to avoid reading undefined content.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-06-01 08:46:40 +08:00
..
Application MdeModulePkg MemoryProfileInfo: Use PdbStringOffset to get PDB info 2017-05-24 15:27:35 +08:00
Bus MdeModulePkg/PciHostBridgeDxe: Fix EBC build failure 2017-05-18 16:44:26 +08:00
Core MdeModulePkg SmiHandlerProfile: Use fixed data type in data structure 2017-05-24 15:27:34 +08:00
Include MdeModulePkg SmiHandlerProfile: Use fixed data type in data structure 2017-05-24 15:27:34 +08:00
Library MdeModulePkg/PrintLib: Avoid reading content beyond the format string 2017-06-01 08:46:40 +08:00
Logo MdeModulePkg/LogoDxe: Return error if HII Package not present 2017-05-22 16:30:11 -07:00
Universal MdeModulePkg/DebugSupportDxe: Fix XCODE5 build failure 2017-05-24 16:44:21 -07:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
License.txt Update copyright format 2012-04-24 06:49:39 +00:00
MdeModulePkg.dec MdeModulePkg/Include: Add IOMMU protocol definition. 2017-05-17 16:05:12 +08:00
MdeModulePkg.dsc MdeModulePkg: Update DEC/DSC version from 0.96 to 0.97 2017-05-05 15:55:09 +08:00
MdeModulePkg.uni MdeModulePkg: Add PROMPT&HELP string of pcd to UNI file 2017-03-07 21:47:19 +08:00
MdeModulePkgExtra.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00