subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1833848 - /subversion/trunk/subversion/libsvn_client/conflicts.c
Date Tue, 19 Jun 2018 14:33:25 GMT
Author: stsp
Date: Tue Jun 19 14:33:25 2018
New Revision: 1833848

URL: http://svn.apache.org/viewvc?rev=1833848&view=rev
Log:
Avoid potential (start_rev > end_rev) assertion failure in conflict resolver.

* subversion/libsvn_client/conflicts.c
  (conflict_tree_get_details_incoming_delete): Make sure the end_rev
   parameter provided to find_revision_for_suspected_deletion() is
   greater than the start revision.

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

Modified: subversion/trunk/subversion/libsvn_client/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/conflicts.c?rev=1833848&r1=1833847&r2=1833848&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_client/conflicts.c Tue Jun 19 14:33:25 2018
@@ -4899,6 +4899,7 @@ conflict_tree_get_details_incoming_delet
           const char *parent_repos_relpath;
           svn_revnum_t parent_peg_rev;
           svn_revnum_t deleted_rev;
+          svn_revnum_t end_rev;
           const char *deleted_rev_author;
           svn_node_kind_t replacing_node_kind;
           apr_array_header_t *moves;
@@ -4931,12 +4932,15 @@ conflict_tree_get_details_incoming_delet
               related_peg_rev = SVN_INVALID_REVNUM;
             }
 
+          end_rev = (new_kind == svn_node_none ? 0 : old_rev);
+          if (end_rev >= parent_peg_rev)
+            end_rev = (parent_peg_rev > 0 ? parent_peg_rev - 1 : 0);
+
           SVN_ERR(find_revision_for_suspected_deletion(
                     &deleted_rev, &deleted_rev_author, &replacing_node_kind,
                     &moves, conflict,
                     svn_dirent_basename(conflict->local_abspath, scratch_pool),
-                    parent_repos_relpath, parent_peg_rev,
-                    new_kind == svn_node_none ? 0 : old_rev,
+                    parent_repos_relpath, parent_peg_rev, end_rev,
                     related_repos_relpath, related_peg_rev,
                     ctx, conflict->pool, scratch_pool));
           if (deleted_rev == SVN_INVALID_REVNUM)



Mime
View raw message