audk/MdePkg/Library
Hao Wu 458cd568b6 MdePkg/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:05 +08:00
..
BaseCacheMaintenanceLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BaseCpuLib MdePkg BaseCpuLib: Convert X64/CpuSleep.asm to NASM 2016-06-28 09:51:45 +08:00
BaseDebugLibNull MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BaseDebugLibSerialPort MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BaseDebugPrintErrorLevelLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BaseExtractGuidedSectionLib MdePkg: Fix some typing errors 2016-10-07 18:05:37 -07:00
BaseIoLibIntrinsic MdePkg: BaseIoLibIntrinsic (IoLib class) library 2017-04-13 13:16:00 +08:00
BaseLib MdePkg: Convert files to CRLF line ending 2017-04-06 15:43:27 +08:00
BaseMemoryLib MdePkg/MemoryLib: Refine InternalMemSetMem16|32|64 functions logic 2016-12-22 16:17:16 +08:00
BaseMemoryLibMmx MdePkg/BaseMemoryLib*: check for zero length in ZeroMem () 2016-11-04 09:53:01 +00:00
BaseMemoryLibOptDxe MdePkg/BaseMemoryLib*: check for zero length in ZeroMem () 2016-11-04 09:53:01 +00:00
BaseMemoryLibOptPei MdePkg/BaseMemoryLib*: check for zero length in ZeroMem () 2016-11-04 09:53:01 +00:00
BaseMemoryLibRepStr MdePkg/BaseMemoryLib*: check for zero length in ZeroMem () 2016-11-04 09:53:01 +00:00
BaseMemoryLibSse2 MdePkg/BaseMemoryLib*: check for zero length in ZeroMem () 2016-11-04 09:53:01 +00:00
BaseOrderedCollectionRedBlackTreeLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BasePalLibNull MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BasePcdLibNull MdePkg: Follow PI1.4a to fix artificial limitation of SkuId range 2016-05-23 10:48:53 +08:00
BasePciCf8Lib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BasePciExpressLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BasePciLibCf8 MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BasePciLibPciExpress MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BasePciSegmentLibPci MdePkg: Add PciSegmentLib instance based on PciLib 2016-01-18 04:50:04 +00:00
BasePeCoffExtraActionLibNull MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BasePeCoffGetEntryPointLib MdePkg/PeCoffGetEntryPointLib: Add PeCoffSerachImageBase() 2017-04-07 09:43:36 +08:00
BasePeCoffLib MdePkg: Refine casting expression result to bigger size 2017-03-06 14:18:45 +08:00
BasePerformanceLibNull MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BasePostCodeLibDebug MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BasePostCodeLibPort80 MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BasePrintLib MdePkg/BasePrintLib: Refine the comment for AsciiValueToStringS API 2017-03-13 11:09:23 +08:00
BaseReportStatusCodeLibNull MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BaseRngLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BaseS3BootScriptLibNull MdePkg, MdeModulePkg: S3BootScriptSaveMemPoll(): accept 64-bit LoopTimes 2017-01-03 12:22:47 +01:00
BaseS3IoLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BaseS3PciLib MdePkg: Refine casting expression result to bigger size 2017-03-06 14:18:45 +08:00
BaseS3SmbusLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BaseS3StallLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BaseSerialPortLibNull MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BaseSmbusLibNull MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BaseStackCheckLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BaseSynchronizationLib MdePkg/BaseSynchronizationLib: Fix function names in function headers 2016-11-17 17:08:26 -08:00
BaseTimerLibNullTemplate MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BaseUefiDecompressLib MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
DxeCoreEntryPoint MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
DxeCoreHobLib MdePkg HobLib: Check FV alignment when building FV HOB 2016-11-17 09:27:12 +08:00
DxeExtendedSalLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
DxeExtractGuidedSectionLib MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
DxeHobLib MdePkg DxeHobLib: Make GetHobList working before Constructor is called 2017-01-20 15:39:23 +08:00
DxeHstiLib MdePkg/Hsti: Fix a memory allocation check issue. 2016-06-06 09:18:24 +08:00
DxeIoLibCpuIo2 MdePkg: Avoid Non-Boolean type used as Boolean 2017-01-20 15:40:59 +08:00
DxeIoLibEsal MdePkg/DxeIoLibEsal: Add new Fifo routines in IoLib class 2017-01-17 10:11:20 +08:00
DxePalLibEsal MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
DxePcdLib MdePkg: Follow PI1.4a to fix artificial limitation of SkuId range 2016-05-23 10:48:53 +08:00
DxePciLibEsal MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
DxePciSegmentLibEsal MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
DxeRuntimeExtendedSalLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
DxeRuntimePciExpressLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
DxeSalLibEsal MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
DxeServicesLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
DxeServicesTableLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
DxeSmbusLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
DxeTimerLibEsal MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
PeiCoreEntryPoint MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
PeiDxePostCodeLibReportStatusCode MdePkg PeiDxePostCodeLibReportStatusCode: Correct files with CRLF line ending 2016-07-29 09:18:12 +08:00
PeiExtractGuidedSectionLib MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
PeiHobLib MdePkg HobLib: Check FV alignment when building FV HOB 2016-11-17 09:27:12 +08:00
PeiIoLibCpuIo MdePkg/PeiIoLibCpuIo: Add new Fifo routines in IoLib class 2017-01-17 10:11:14 +08:00
PeiMemoryAllocationLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
PeiMemoryLib MdePkg/MemoryLib: Refine InternalMemSetMem16|32|64 functions logic 2016-12-22 16:17:16 +08:00
PeiPalLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
PeiPcdLib MdePkg: Follow PI1.4a to fix artificial limitation of SkuId range 2016-05-23 10:48:53 +08:00
PeiPciLibPciCfg2 MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
PeiPciSegmentLibPciCfg2 MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
PeiResourcePublicationLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
PeiServicesLib MdePkg PeiServicesLib: Make sure FvInfo has FFS2 format if NULL FvFormat 2016-10-27 21:47:48 +08:00
PeiServicesTablePointerLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
PeiServicesTablePointerLibIdt MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
PeiServicesTablePointerLibKr7 MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
PeiSmbusLibSmbus2Ppi MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
PeimEntryPoint MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
SecPeiDxeTimerLibCpu MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
SmiHandlerProfileLibNull MdePkg/SmiHandlerProfile: Add Context support in Unregister 2017-03-13 16:04:11 +08:00
SmmIoLibSmmCpuIo2 MdePkg: Avoid Non-Boolean type used as Boolean 2017-01-20 15:40:59 +08:00
SmmLibNull MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
SmmMemLib MdePkg-SmmMemLib: Enhance SmmIsBufferOutsideSmmValid() check for fixed comm buffer. 2016-04-29 12:49:26 +08:00
SmmMemoryAllocationLib MdePkg: Refine casting expression result to bigger size 2017-03-06 14:18:45 +08:00
SmmPciExpressLib MdePkg: Add SMM PciExpressLib Instance 2016-09-27 11:01:23 +08:00
SmmPciLibPciRootBridgeIo MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
SmmPeriodicSmiLib MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
SmmServicesTableLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
UefiApplicationEntryPoint MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
UefiBootServicesTableLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
UefiDebugLibConOut MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
UefiDebugLibDebugPortProtocol MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
UefiDebugLibStdErr MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
UefiDevicePathLib MdePkg/UefiDevicePathLib: Refine the DevPathFromTextiSCSI protocol parsing 2017-03-30 11:32:24 +08:00
UefiDevicePathLibDevicePathProtocol MdePkg DevicePathLib: Validate before touch input buffer. 2016-11-09 17:49:15 +08:00
UefiDriverEntryPoint MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
UefiFileHandleLib MdePkg/UefiFileHandleLib: Refine the check for valid Ascii character 2017-01-12 21:26:26 +08:00
UefiLib MdePkg/UefiLib: Avoid mis-calculate of graphic console size 2017-04-14 13:16:05 +08:00
UefiMemoryAllocationLib MdePkg: Refine casting expression result to bigger size 2017-03-06 14:18:45 +08:00
UefiMemoryLib MdePkg/MemoryLib: Refine InternalMemSetMem16|32|64 functions logic 2016-12-22 16:17:16 +08:00
UefiPalLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
UefiPciLibPciRootBridgeIo MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
UefiPciSegmentLibPciRootBridgeIo MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
UefiRuntimeLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
UefiRuntimeServicesTableLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
UefiSalLib MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
UefiScsiLib MdePkg UefiScsiLib: Raise the Tpl of async IO callback to TPL_NOTIFY 2015-12-22 13:58:09 +00:00
UefiUsbLib MdePkg: Fix some typing errors 2016-10-07 18:05:37 -07:00