Author: kotkov
Date: Thu Aug 10 14:03:28 2017
New Revision: 1804673

URL: http://svn.apache.org/viewvc?rev=1804673&view=rev
Log:
* subversion/libsvn_client/import.c
  (txdelta_next_window): Rewrite this function using a local variable
   for the result, to prevent bugs similar to the one fixed in r1804672.

Modified:
    subversion/trunk/subversion/libsvn_client/import.c

Modified: subversion/trunk/subversion/libsvn_client/import.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/import.c?rev=1804673&r1=1804672&r2=1804673&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/import.c (original)
+++ subversion/trunk/subversion/libsvn_client/import.c Thu Aug 10 14:03:28 2017
@@ -80,19 +80,21 @@ typedef struct txdelta_stream_baton_t
 } txdelta_stream_baton_t;
 
 static svn_error_t *
-txdelta_next_window(svn_txdelta_window_t **window,
+txdelta_next_window(svn_txdelta_window_t **window_p,
                     void *baton,
                     apr_pool_t *pool)
 {
   struct txdelta_stream_baton_t *b = baton;
+  svn_txdelta_window_t *window;
 
-  SVN_ERR(svn_txdelta_next_window(window, b->txstream, pool));
-  if (!*window)
+  SVN_ERR(svn_txdelta_next_window(&window, b->txstream, pool));
+  if (!window)
     {
       memcpy(b->digest_buffer, svn_txdelta_md5_digest(b->txstream),
              APR_MD5_DIGESTSIZE);
     }
 
+  *window_p = window;
   return SVN_NO_ERROR;
 }
 


Reply via email to