HomeFreeBSD

iommu_gas: avoid overflow in bounds check

Description

iommu_gas: avoid overflow in bounds check

Change the range test in iommu_gas_match_one from '< ubound' to '<=
ubound', and pass a smaller-by-one ubound parameter to it, to avoid
overflow in ubound calculation.

Reported by: andrew
Reviewed by: andrew (previous version)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D37764

Details

Provenance
dougmAuthored on Dec 22 2022, 8:31 PM
Reviewer
andrew
Differential Revision
D37764: iommu_gas: avoid overflow in bounds check
Parents
rG3cf65f8a7f8e: sh(1): Allow non-printing characters in prompt strings
Branches
Unknown
Tags
Unknown