Re: [edk2] [PATCH 1/2] MdePkg/UefiLib: Avoid mis-calculate of graphic console size

2017-04-13 Thread Gao, Liming
Reviewed-by: Liming Gao >-Original Message- >From: Wu, Hao A >Sent: Tuesday, April 11, 2017 10:17 AM >To: edk2-devel@lists.01.org >Cc: Wu, Hao A ; Gao, Liming >Subject: [PATCH 1/2] MdePkg/UefiLib: Avoid mis-calculate of graphic console >size > >The commit adds check in function InternalP

[edk2] [PATCH 1/2] MdePkg/UefiLib: Avoid mis-calculate of graphic console size

2017-04-10 Thread Hao Wu
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