mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
iommu_gas_match_one(): check for underflow
Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
7153d5e4bc
commit
a869643e18
1 changed files with 2 additions and 0 deletions
|
|
@ -329,6 +329,8 @@ iommu_gas_match_one(struct iommu_gas_match_args *a, iommu_gaddr_t beg,
|
|||
start = roundup2(beg, a->common->alignment);
|
||||
if (start < beg)
|
||||
return (false);
|
||||
if (end < IOMMU_PAGE_SIZE + 1)
|
||||
return (false);
|
||||
end = MIN(end - IOMMU_PAGE_SIZE - 1, ubound);
|
||||
offset = a->offset;
|
||||
size = a->size;
|
||||
|
|
|
|||
Loading…
Reference in a new issue