mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-08 13:28:05 +00:00
fix a bug in the computation of the userspace offset for a give netmap buffer.
Submitted by: Hugh Nhan
This commit is contained in:
parent
a08f2cf69e
commit
aa76317cfc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=249504
@ -278,7 +278,7 @@ netmap_obj_offset(struct netmap_obj_pool *p, const void *vaddr)
|
||||
const char *base = p->lut[i].vaddr;
|
||||
ssize_t relofs = (const char *) vaddr - base;
|
||||
|
||||
if (relofs < 0 || relofs > p->_clustsize)
|
||||
if (relofs < 0 || relofs >= p->_clustsize)
|
||||
continue;
|
||||
|
||||
ofs = ofs + relofs;
|
||||
|
Loading…
Reference in New Issue
Block a user