You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2007/04/23 12:46:01 UTC
svn commit: r531420 - in /apr/apr/branches/1.2.x: CHANGES
network_io/unix/sendrecv.c
Author: jorton
Date: Mon Apr 23 03:45:55 2007
New Revision: 531420
URL: http://svn.apache.org/viewvc?view=rev&rev=531420
Log:
Merge r472076 from trunk:
* network_io/unix/sendrecv.c (apr_socket_sendfile) [HAVE_SENDFILEV]:
Prevent EFAULT failures with Solaris sendfilev in LFS builds.
PR: 39463
Submitted by: jorton, Joseph Tam <tam math.ubc.ca>
Modified:
apr/apr/branches/1.2.x/CHANGES
apr/apr/branches/1.2.x/network_io/unix/sendrecv.c
Modified: apr/apr/branches/1.2.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/CHANGES?view=diff&rev=531420&r1=531419&r2=531420
==============================================================================
--- apr/apr/branches/1.2.x/CHANGES (original)
+++ apr/apr/branches/1.2.x/CHANGES Mon Apr 23 03:45:55 2007
@@ -1,5 +1,9 @@
Changes for APR 1.2.9
+ *) Fix possible EFAULT failures in apr_socket_sendfile() on 32-bit
+ Solaris with LFS enabled. PR 39463. [Joe Orton, Joseph Tam
+ <tam math.ubc.ca>]
+
*) Fix deadlock in apr_file_gets() for a file opened with both the
APR_BUFFERED and APR_XTHREAD flags. [Bojan Smojver, Joe Orton]
Modified: apr/apr/branches/1.2.x/network_io/unix/sendrecv.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/network_io/unix/sendrecv.c?view=diff&rev=531420&r1=531419&r2=531420
==============================================================================
--- apr/apr/branches/1.2.x/network_io/unix/sendrecv.c (original)
+++ apr/apr/branches/1.2.x/network_io/unix/sendrecv.c Mon Apr 23 03:45:55 2007
@@ -872,7 +872,9 @@
for (i = 0; i < hdtr->numheaders; i++, curvec++) {
sfv[curvec].sfv_fd = SFV_FD_SELF;
sfv[curvec].sfv_flag = 0;
- sfv[curvec].sfv_off = (apr_off_t)hdtr->headers[i].iov_base;
+ /* Cast to unsigned long to prevent sign extension of the
+ * pointer value for the LFS case; see PR 39463. */
+ sfv[curvec].sfv_off = (unsigned long)hdtr->headers[i].iov_base;
sfv[curvec].sfv_len = hdtr->headers[i].iov_len;
requested_len += sfv[curvec].sfv_len;
}
@@ -896,7 +898,7 @@
for (i = 0; i < hdtr->numtrailers; i++, curvec++) {
sfv[curvec].sfv_fd = SFV_FD_SELF;
sfv[curvec].sfv_flag = 0;
- sfv[curvec].sfv_off = (apr_off_t)hdtr->trailers[i].iov_base;
+ sfv[curvec].sfv_off = (unsigned long)hdtr->trailers[i].iov_base;
sfv[curvec].sfv_len = hdtr->trailers[i].iov_len;
requested_len += sfv[curvec].sfv_len;
}