Author: ed Date: Sun Aug 21 09:32:20 2016 New Revision: 304556 URL: https://svnweb.freebsd.org/changeset/base/304556
Log: Use the right _MAX constant. Though uio_resid is of type ssize_t, we need to take into account that this source file contains an implementation specific to a certain userspace pointer size. If this file provided 32-bit implementations, this should have used INT32_MAX, even when running a 64-bit kernel. This change has no effect, but is simply in preparation for adding support for running 32-bit CloudABI executables. Modified: head/sys/compat/cloudabi64/cloudabi64_fd.c Modified: head/sys/compat/cloudabi64/cloudabi64_fd.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_fd.c Sun Aug 21 07:41:11 2016 (r304555) +++ head/sys/compat/cloudabi64/cloudabi64_fd.c Sun Aug 21 09:32:20 2016 (r304556) @@ -72,7 +72,7 @@ cloudabi64_copyinuio(const cloudabi64_io } iov[i].iov_base = (void *)iovobj.iov_base; iov[i].iov_len = iovobj.iov_len; - if (iov[i].iov_len > SSIZE_MAX - uio->uio_resid) { + if (iov[i].iov_len > INT64_MAX - uio->uio_resid) { free(uio, M_IOV); return (EINVAL); } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"