vn_bmap_seekhole: check that passed offset is non-negative
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37024
This commit is contained in:
parent
8b32cdec9c
commit
33ce178835
@ -2576,7 +2576,7 @@ vn_bmap_seekhole_locked(struct vnode *vp, u_long cmd, off_t *off,
|
||||
if (error != 0)
|
||||
goto out;
|
||||
noff = *off;
|
||||
if (noff >= va.va_size) {
|
||||
if (noff < 0 || noff >= va.va_size) {
|
||||
error = ENXIO;
|
||||
goto out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user