diff options
| author | Hao Wu <hao.a.wu@intel.com> | 2017-05-22 09:49:11 +0300 |
|---|---|---|
| committer | Hao Wu <hao.a.wu@intel.com> | 2017-06-01 03:46:31 +0300 |
| commit | b1d4b9651e1143245eccd99af0e2940635c2058f (patch) | |
| tree | f31f9e91bb32aa82582a88a75ed098c5081b3062 /BaseTools/Source/Python/CommonDataClass/DataClass.py | |
| parent | 4fc8277133fb011d028b4e0a42444ab6f552d0b9 (diff) | |
| download | edk2-b1d4b9651e1143245eccd99af0e2940635c2058f.tar.xz | |
MdePkg/BasePrintLib: Avoid reading content beyond the format string
https://bugzilla.tianocore.org/show_bug.cgi?id=567
In function BasePrintLibSPrintMarker(), 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>
Diffstat (limited to 'BaseTools/Source/Python/CommonDataClass/DataClass.py')
0 files changed, 0 insertions, 0 deletions
