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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

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

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
…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 <michael.kubacki@microsoft.com>
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.

2 participants