Author: svn-role
Date: Sun Jul 13 04:00:06 2025
New Revision: 1927163

URL: http://svn.apache.org/viewvc?rev=1927163&view=rev
Log:
Merge r1892118 from trunk:

* r1892118
  Fix a NULL pointer dereference in the conflict resolver.
  Justification:
    1.14.5 users are running into this crash.
  Votes:
   +1: stsp, rinrab

Modified:
    subversion/branches/1.14.x/   (props changed)
    subversion/branches/1.14.x/STATUS
    subversion/branches/1.14.x/subversion/libsvn_client/conflicts.c

Propchange: subversion/branches/1.14.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1892118

Modified: subversion/branches/1.14.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/STATUS?rev=1927163&r1=1927162&r2=1927163&view=diff
==============================================================================
--- subversion/branches/1.14.x/STATUS (original)
+++ subversion/branches/1.14.x/STATUS Sun Jul 13 04:00:06 2025
@@ -35,11 +35,3 @@ Veto-blocked changes:
 
 Approved changes:
 =================
-
-* r1892118
-  Fix a NULL pointer dereference in the conflict resolver.
-  Justification:
-    1.14.5 users are running into this crash.
-  Votes:
-   +1: stsp, rinrab
-

Modified: subversion/branches/1.14.x/subversion/libsvn_client/conflicts.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/subversion/libsvn_client/conflicts.c?rev=1927163&r1=1927162&r2=1927163&view=diff
==============================================================================
--- subversion/branches/1.14.x/subversion/libsvn_client/conflicts.c (original)
+++ subversion/branches/1.14.x/subversion/libsvn_client/conflicts.c Sun Jul 13 
04:00:06 2025
@@ -2847,12 +2847,26 @@ conflict_tree_get_details_local_missing(
   /* Make sure we're going to search the related node in a revision where
    * it exists. The younger incoming node might have been deleted in HEAD. */
   if (related_repos_relpath != NULL && related_peg_rev != SVN_INVALID_REVNUM)
-    SVN_ERR(find_related_node(
-              &related_repos_relpath, &related_peg_rev,
-              related_repos_relpath, related_peg_rev,
-              (old_rev < new_rev ? old_repos_relpath : new_repos_relpath),
-              (old_rev < new_rev ? old_rev : new_rev),
-              conflict, ctx, scratch_pool, scratch_pool));
+    {
+      const char *older_related_repos_relpath;
+      svn_revnum_t older_related_peg_rev;
+      SVN_ERR(find_related_node(
+                &older_related_repos_relpath, &older_related_peg_rev,
+                related_repos_relpath, related_peg_rev,
+                (old_rev < new_rev ? old_repos_relpath : new_repos_relpath),
+                (old_rev < new_rev ? old_rev : new_rev),
+                conflict, ctx, scratch_pool, scratch_pool));
+      if (older_related_repos_relpath != NULL &&
+          older_related_peg_rev != SVN_INVALID_REVNUM)
+        {
+          related_repos_relpath = older_related_repos_relpath;
+          related_peg_rev = older_related_peg_rev;
+        }
+    }
+
+  /* Bail if we are unable to find the related node. */
+  if (related_repos_relpath == NULL || related_peg_rev == SVN_INVALID_REVNUM)
+    return SVN_NO_ERROR;
 
   /* Set END_REV to our best guess of the nearest YCA revision. */
   url = svn_path_url_add_component2(repos_root_url, related_repos_relpath,


Reply via email to