audk/MdeModulePkg
Michael Kubacki 33c81c25bb MdeModulePkg/TraceHubDebugSysTLib: Use wider type for loop comparisons
Resolves a new CodeQL error due to the value being incremented in the
loop being a narrower type than the variable it is being compared
against.

The variable is changed to a UINT32 type so it has the same width as
the type it is being compared against.

Issue explanation: In a loop condition, comparison of a value of a
narrow type with a value of a wide type may result in unexpected
behavior if the wider value is sufficiently large (or small). This
is because the narrower value may overflow. This can lead to an
infinite loop.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Gua Guo <gua.guo@intel.com>
Cc: Prakashan Krishnadas Veliyathuparambil <krishnadas.veliyathuparambil.prakashan@intel.com>
Cc: K N Karthik <karthik.k.n@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Gua Guo <gua.guo@intel.com>
2024-02-26 23:13:08 +00:00
..
Application MdeModulePkg/CapsuleApp: Add EFIAPI to CompareFileNameInAlphabet() 2023-05-06 17:48:49 +00:00
Bus MdeModulePkg/Bus/Usb/UsbNetwork: Check array index range before access 2024-02-26 20:46:12 +00:00
Core MdeModulePkg: Align RuntimeDxe function headers with UEFI return values 2024-02-09 22:16:32 +00:00
Include MdeModulePkg/Core/Dxe: Set MemoryTypeInfo bin range from HOB 2024-01-30 18:30:02 +00:00
Library MdeModulePkg/TraceHubDebugSysTLib: Use wider type for loop comparisons 2024-02-26 23:13:08 +00:00
Logo MdeModulePkg/Logo: Add LoongArch64 architecture. 2022-10-14 02:16:33 +00:00
Test MdeModulePkg: Update DumpImageRecord() in ImagePropertiesRecordLib 2023-11-27 18:55:18 +00:00
Universal MdeModulePkg: Align RuntimeDxe function headers with UEFI return values 2024-02-09 22:16:32 +00:00
MdeModulePkg.ci.yaml MdeModulePkg: CI: Add PrEval entry 2023-10-23 20:17:52 +00:00
MdeModulePkg.dec MdeModulePkg: Support customized FV Migration Information 2023-12-25 12:57:18 +08:00
MdeModulePkg.dsc MdeModulePkg: Add ImagePropertiesRecordLib 2023-11-27 18:55:18 +00:00
MdeModulePkg.uni MdeModulePkg: Add TraceHubDebugSysTLib library 2023-05-11 07:26:38 +00:00
MdeModulePkgExtra.uni