audk/MdeModulePkg
Dandan Bi f76bc44362 MdeModulePkg/HiiDB: Avoid incorrect results of multiplication
An example:
The codes in function Output8bitPixel in Image.c:
OffsetY = BITMAP_LEN_8_BIT ((UINT32) Image->Width, Ypos);

Both Image->Width and Ypos are of type UINT16. They will be promoted to
int (signed) first, and then perform the multiplication defined by macro
BITMAP_LEN_8_BIT. If the result of multiplication between Image->Width and
Ypos exceeds the range of type int, a potential incorrect results
will be assigned to OffsetY.

This commit adds explicit UINT32 type cast for 'Image->Width' to avoid
possible overflow in the int range. And also fix similar issues in
HiiDatabase.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
2017-04-18 15:56:22 +08:00
..
Application MdeModulePkg/BootManagerMenu: Add assertion to indicate no DIV by 0 2017-04-14 18:28:50 +08:00
Bus MdeModulePkg/UsbBotPei: Fix undefined behavior in signed left shift 2017-04-13 08:59:07 +08:00
Core MdeModulePkg/DxeCore: Add ASSERT to ensure no subtract underflow 2017-04-14 13:13:51 +08:00
Include MdeModulePkg/CpuExceptionHandlerLib: Add DumpCpuContext() 2017-04-07 09:43:40 +08:00
Library MdeModulePkg/BMMUiLib: Update codes of initializing ConsoleXXXCheck array 2017-04-18 15:56:21 +08:00
Logo MdeModulePkg/LogoDxe: Add missing dependency gEfiHiiImageExProtocolGuid 2017-03-17 12:25:14 +08:00
Universal MdeModulePkg/HiiDB: Avoid incorrect results of multiplication 2017-04-18 15:56:22 +08: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: move PlatformHasAcpiGuid from EmbeddedPkg 2017-04-05 16:59:13 +01:00
MdeModulePkg.dsc MdeModulePkg: Add Brotli algorithm decompression library 2017-03-29 12:14:41 +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