subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1137676 - /subversion/trunk/subversion/libsvn_client/repos_diff.c
Date Mon, 20 Jun 2011 16:06:11 GMT
Author: philip
Date: Mon Jun 20 16:06:11 2011
New Revision: 1137676

URL: http://svn.apache.org/viewvc?rev=1137676&view=rev
Log:
Fix random errors in blame_tests 10 and 11.

* subversion/libsvn_client/repos_diff.c
  (remove_non_prop_changes): Avoid reading beyond end of array, make void.
  (close_directory): No return value from remove_non_prop_changes.

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

Modified: subversion/trunk/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/repos_diff.c?rev=1137676&r1=1137675&r2=1137676&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/repos_diff.c Mon Jun 20 16:06:11 2011
@@ -392,7 +392,7 @@ get_file_from_ra(struct file_baton *b,
      
      This function filters these property changes from the change hash
  */
-static svn_error_t *
+static void
 remove_non_prop_changes(apr_hash_t *pristine_props,
                         apr_array_header_t *changes)
 {
@@ -413,7 +413,7 @@ remove_non_prop_changes(apr_hash_t *pris
               int j;
 
               /* Remove the matching change by shifting the rest */
-              for (j = i; j < changes->nelts; j++)
+              for (j = i; j < changes->nelts - 1; j++)
                 {
                   APR_ARRAY_IDX(changes, j, svn_prop_t)
                        = APR_ARRAY_IDX(changes, j+1, svn_prop_t);
@@ -422,8 +422,6 @@ remove_non_prop_changes(apr_hash_t *pris
             }
         }
     }
-
-  return SVN_NO_ERROR;
 }
 
 /* Get the props attached to a directory in the repository at BASE_REVISION. */
@@ -1113,7 +1111,7 @@ close_directory(void *dir_baton,
   scratch_pool = b->pool;
 
   if (!b->added && b->propchanges->nelts > 0)
-    SVN_ERR(remove_non_prop_changes(b->pristine_props, b->propchanges));
+    remove_non_prop_changes(b->pristine_props, b->propchanges);
 
   /* Don't do the props_changed stuff if this is a dry_run and we don't
      have an access baton, since in that case the directory will already



Mime
View raw message