mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
iommu_gas_match_one(): check for underflow
(cherry picked from commit a869643e184a73382ef7939b465fd42785e096d1)
This commit is contained in:
parent
056e270e26
commit
eb0d8cb121
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