Skip to content

Commit cadcaae

Browse files
os-dProjectMuBot
authored andcommitted
[CHERRY-PICK] DynamicTablesPkg: AmlLib: Fix CodeQL Issue
Without the addition of this cast, the compiler promotes 1 to a UINT32, which leads CodeQL to complain that different size types are being compared. Signed-off-by: Oliver Smith-Denny <[email protected]>
1 parent de3cf0c commit cadcaae

File tree

1 file changed

+1
-1
lines changed
  • DynamicTablesPkg/Library/Common/AmlLib/AmlEncoding

1 file changed

+1
-1
lines changed

DynamicTablesPkg/Library/Common/AmlLib/AmlEncoding/Aml.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ AmlSetPkgLength (
774774
// Write to the Buffer.
775775
*Buffer = LeadByte;
776776
CurrentOffset = 1;
777-
while (CurrentOffset < (Offset + 1)) {
777+
while (CurrentOffset < (Offset + (UINT8)1)) {
778778
CurrentShift = (UINT8)((CurrentOffset - 1) * 8);
779779
ComputedLength = Length & (UINT32)(0x00000FF0 << CurrentShift);
780780
ComputedLength = (ComputedLength) >> (4 + CurrentShift);

0 commit comments

Comments
 (0)