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

FmpDevicePkg/FmpDependencyLib: Fix potential overflow in loop #6281

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

makubacki
Copy link
Member

Description

FmpVersionsCount 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 FmpVersionsCount values larger than UINT8_MAX. This change makes Index a UINTN to match in width.

  • Breaking change?
  • Impacts security?
  • Includes tests?

How This Was Tested

  • FmpDevicePkg build and CI
  • CodeQL against FmpDevicePkg

Integration Instructions

N/A

FmpVersionsCount 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 FmpVersionsCount values larger than UINT8_MAX. This change
makes Index a UINTN to match in width.

Signed-off-by: Michael Kubacki <[email protected]>
@makubacki
Copy link
Member Author

@lgao4 & @mdkinney, thanks for the review. Please add the push label when you're ready.

@mdkinney mdkinney added the push Auto push patch series in PR if all checks pass label Oct 9, 2024
@mergify mergify bot merged commit 06da7da into tianocore:master Oct 9, 2024
126 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
push Auto push patch series in PR if all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants