You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/03/20 14:36:28 UTC

svn commit: r1302884 - in /subversion/branches/1.6.x: ./ STATUS subversion/libsvn_ra_serf/update.c

Author: stsp
Date: Tue Mar 20 13:36:27 2012
New Revision: 1302884

URL: http://svn.apache.org/viewvc?rev=1302884&view=rev
Log:
On the 1.6.x branch, merge r1154733 from trunk.

 * r1154733
   Correctly position buffer pointer when resuming an aborted transfer in serf.
   Justification:
     Invalid pointer operation that causes at least datastream corruption.
   Votes:
     +1: rhuijben, stsp, philip

Modified:
    subversion/branches/1.6.x/   (props changed)
    subversion/branches/1.6.x/STATUS
    subversion/branches/1.6.x/subversion/libsvn_ra_serf/update.c

Propchange: subversion/branches/1.6.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1154733

Modified: subversion/branches/1.6.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/STATUS?rev=1302884&r1=1302883&r2=1302884&view=diff
==============================================================================
--- subversion/branches/1.6.x/STATUS (original)
+++ subversion/branches/1.6.x/STATUS Tue Mar 20 13:36:27 2012
@@ -234,13 +234,6 @@ Approved changes:
    Votes:
      +1: julianfoad, stsp, rhuijben
 
- * r1154733
-   Correctly position buffer pointer when resuming an aborted transfer in serf.
-   Justification:
-     Invalid pointer operation that causes at least datastream corruption.
-   Votes:
-     +1: rhuijben, stsp, philip
-
  * r1166555, r1166678
    Fix a crash in ra_svn SASL authentication.
    Justification:

Modified: subversion/branches/1.6.x/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_ra_serf/update.c?rev=1302884&r1=1302883&r2=1302884&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/1.6.x/subversion/libsvn_ra_serf/update.c Tue Mar 20 13:36:27 2012
@@ -847,6 +847,7 @@ handle_fetch(serf_request_t *request,
 
       if (fetch_ctx->aborted_read == TRUE)
         {
+          apr_off_t skip;
           /* We haven't caught up to where we were before. */
           if (fetch_ctx->read_size < fetch_ctx->aborted_read_size)
             {
@@ -867,9 +868,10 @@ handle_fetch(serf_request_t *request,
           /* Woo-hoo.  We're back. */
           fetch_ctx->aborted_read = FALSE;
 
-          /* Increment data and len by the difference. */
-          data += fetch_ctx->read_size - fetch_ctx->aborted_read_size;
-          len = fetch_ctx->read_size - fetch_ctx->aborted_read_size;
+          /* Update data and len to just provide the new data. */
+          skip = len - (fetch_ctx->read_size - fetch_ctx->aborted_read_size);
+          data += skip;
+          len -= skip;
         }
 
       if (fetch_ctx->delta_stream)