Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IntelSiliconPkg: Code Quality Improvements #215

Merged
merged 2 commits into from
Oct 3, 2024

Conversation

makubacki
Copy link
Member

Two commits:


IntelSiliconPkg/IntelVTdDmarPei: Prevent invalid dereference

Prevent invalid DMAR ACPI table dereference if the table is not
found.


IntelSiliconPkg/SmmAccess: Fix potential integer overflow in loop comparison

SmmAccessDxe:

mSmmAccess.NumberRegions is a UINTN while the loop index variable
compared against it is a UINT8. This can lead to an overflow of the
loop index for mSmmAccess.NumberRegions for values larger than
UINT8_MAX. This change makes Index a UINTN to match in width.

PeiSmmAccessLib:

Fixes a similar UINT8 loop index issue.

@makubacki
Copy link
Member Author

@SaiChaganty, are you going to merge this?

@SaiChaganty
Copy link

@SaiChaganty, are you going to merge this?

yes. but please address the feedback I've provided (something I missed during my previous review)

Prevent invalid DMAR ACPI table dereference if the table is not
found.

Signed-off-by: Michael Kubacki <[email protected]>
…parison

SmmAccessDxe:

`mSmmAccess.NumberRegions` is a `UINTN` while the loop index variable
compared against it is a `UINT8`. This can lead to an overflow of the
loop index for `mSmmAccess.NumberRegions` for values larger than
`UINT8_MAX`. This change makes `Index` a `UINTN` to match in width.

PeiSmmAccessLib:

Fixes a similar `UINT8` loop index issue.

Signed-off-by: Michael Kubacki <[email protected]>
@SaiChaganty SaiChaganty merged commit 62c5bac into tianocore:master Oct 3, 2024
1 check passed
@SaiChaganty
Copy link

SaiChaganty commented Oct 3, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants