svn commit: r207725 - head/sys/kern
Edward Tomasz Napierala
trasz at FreeBSD.org
Thu May 6 18:52:41 UTC 2010
Author: trasz
Date: Thu May 6 18:52:41 2010
New Revision: 207725
URL: http://svn.freebsd.org/changeset/base/207725
Log:
Avoid overflow.
Submitted by: bde@
Modified:
head/sys/kern/vfs_vnops.c
Modified: head/sys/kern/vfs_vnops.c
==============================================================================
--- head/sys/kern/vfs_vnops.c Thu May 6 18:51:47 2010 (r207724)
+++ head/sys/kern/vfs_vnops.c Thu May 6 18:52:41 2010 (r207725)
@@ -1348,7 +1348,7 @@ vn_rlimit_fsize(const struct vnode *vp,
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);
More information about the svn-src-head
mailing list