audk/IntelFrameworkPkg
Hao Wu 9c0e4db3db IntelFrameworkPkg/UefiLib: Avoid mis-calculate of graphic console size
The commit adds check in function InternalPrintGraphic() to ensure that
the expression:

Blt->Width * Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)

will not overflow in the UINTN range.

The commit also adds an explicit UINT32 type cast for 'Blt->Width' to
avoid possible overflow in the int range for:

Blt->Width * Blt->Height

Since both Blt->Width and Blt->Height are of type UINT16. They will be
promoted to int (signed) first, and then perform the multiplication
operation. If the result of multiplication between Blt->Width and
Blt->Height exceeds the range of type int, a potential incorrect size will
be passed into function AllocateZeroPool().

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-04-14 13:16:12 +08:00
..
Include IntelFrameworkPkg: Fix typos in comments 2016-10-24 09:09:26 +08:00
Library IntelFrameworkPkg/UefiLib: Avoid mis-calculate of graphic console size 2017-04-14 13:16:12 +08:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
FrameworkSpecConformance.txt IntelFrameworkPkg/FrameworkSpecConformance.txt: Update the URL 2016-09-15 16:08:01 +08:00
IntelFrameworkPkg.dec IntelFrameworkPkg: Update DEC and DSC version from 0.94 to 0.96 2015-08-20 08:45:45 +00:00
IntelFrameworkPkg.dsc IntelFrameworkPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:04 +08:00
IntelFrameworkPkg.uni IntelFrameworkPkg: Convert all .uni files to utf-8 2015-12-15 04:52:47 +00:00
IntelFrameworkPkgExtra.uni IntelFrameworkPkg: Convert all .uni files to utf-8 2015-12-15 04:52:47 +00:00
License.txt Update copyright format 2012-04-24 06:49:39 +00:00