subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject svn commit: r1469550 - /subversion/trunk/subversion/libsvn_client/merge.c
Date Thu, 18 Apr 2013 20:27:07 GMT
Author: breser
Date: Thu Apr 18 20:27:07 2013
New Revision: 1469550

URL: http://svn.apache.org/r1469550
Log:
Fix a potential segfault in merge.

* subversion/libsvn_client/merge.c
  (find_reintegrate_merge): Move the test for yc_ancestor above the use of
    yc_ancestor to calculate source.ancestral.

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

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1469550&r1=1469549&r2=1469550&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Thu Apr 18 20:27:07 2013
@@ -11444,10 +11444,6 @@ find_reintegrate_merge(merge_source_t **
             &yc_ancestor, source.loc2, source.loc1, target_ra_session,
             ctx, scratch_pool, scratch_pool));
 
-  /* The source side of a reintegrate merge is not 'ancestral', except in
-   * the degenerate case where source == YCA. */
-  source.ancestral = (loc1->rev == yc_ancestor->rev);
-
   if (! yc_ancestor)
     return svn_error_createf(SVN_ERR_CLIENT_NOT_READY_TO_MERGE, NULL,
                              _("'%s@%ld' must be ancestrally related to "
@@ -11455,6 +11451,10 @@ find_reintegrate_merge(merge_source_t **
                              source.loc1->url, source.loc1->rev,
                              source.loc2->url, source.loc2->rev);
 
+  /* The source side of a reintegrate merge is not 'ancestral', except in
+   * the degenerate case where source == YCA. */
+  source.ancestral = (loc1->rev == yc_ancestor->rev);
+
   if (source.loc1->rev > yc_ancestor->rev)
     {
       /* Have we actually merged anything to the source from the



Mime
View raw message