Avoid overflow.
Submitted by: bde@
This commit is contained in:
parent
307d88b787
commit
77dda2b96f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=207725
@ -1348,7 +1348,7 @@ vn_rlimit_fsize(const struct vnode *vp, const struct uio *uio,
|
||||
if (vp->v_type != VREG || td == NULL)
|
||||
return (0);
|
||||
PROC_LOCK(td->td_proc);
|
||||
if (uio->uio_offset + uio->uio_resid >
|
||||
if ((uoff_t)uio->uio_offset + uio->uio_resid >
|
||||
lim_cur(td->td_proc, RLIMIT_FSIZE)) {
|
||||
psignal(td->td_proc, SIGXFSZ);
|
||||
PROC_UNLOCK(td->td_proc);
|
||||
|
Loading…
Reference in New Issue
Block a user