subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1780259 - /subversion/trunk/subversion/libsvn_client/conflicts.c
Date Wed, 25 Jan 2017 19:37:56 GMT
Author: stsp
Date: Wed Jan 25 19:37:56 2017
New Revision: 1780259

URL: http://svn.apache.org/viewvc?rev=1780259&view=rev
Log:
Fix a segfault in the conflict resolver.

Found while playing around with the FreeBSD repo.
I have not yet managed to produce an isolated test case, so no test for now.

* subversion/libsvn_client/conflicts.c
  (resolve_incoming_move_file_text_merge,
   resolve_local_move_file_merge): If we pass empty ancestor props to
    svn_wc_merge5() we will end up crashing. So if the ancestor has no
    props, pass NULL instead which forces svn_wc_merge5() to use base
    properties from the working copy instead.
    BTW, the 'original_props' parameter of svn_wc_merge5 is undocumented...


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=1780259&r1=1780258&r2=1780259&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_client/conflicts.c Wed Jan 25 19:37:56 2017
@@ -7652,7 +7652,8 @@ resolve_incoming_move_file_text_merge(sv
                       NULL, NULL, /* conflict versions */
                       FALSE, /* dry run */
                       NULL, NULL, /* diff3_cmd, merge_options */
-                      ancestor_props, propdiffs,
+                      apr_hash_count(ancestor_props) ? ancestor_props : NULL,
+                      propdiffs,
                       NULL, NULL, /* conflict func/baton */
                       NULL, NULL, /* don't allow user to cancel here */
                       scratch_pool);
@@ -8072,7 +8073,8 @@ resolve_local_move_file_merge(svn_client
                       NULL, NULL, /* conflict versions */
                       FALSE, /* dry run */
                       NULL, NULL, /* diff3_cmd, merge_options */
-                      ancestor_props, propdiffs,
+                      apr_hash_count(ancestor_props) ? ancestor_props : NULL,
+                      propdiffs,
                       NULL, NULL, /* conflict func/baton */
                       NULL, NULL, /* don't allow user to cancel here */
                       scratch_pool);



Mime
View raw message