You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/09/16 16:21:04 UTC
svn commit: r1523666 - /subversion/trunk/subversion/libsvn_client/merge.c
Author: stsp
Date: Mon Sep 16 14:21:03 2013
New Revision: 1523666
URL: http://svn.apache.org/r1523666
Log:
* subversion/libsvn_client/merge.c
(log_find_operative_revs): Don't corrupt mergeinfo paths by snipping off
trailing characters. This function is trying to compute a common prefix
of paths by snipping off a suffix detected with relpath_skip_ancestor().
If relpath_skip_ancestor() returns "" it wants to tell its caller that
the paths provided were equal. This function erroneously went on to
perform path arithmetic anyway, with a zero-sized suffix string, and
thus computed corrupt mergeinfo.
Reported by: Andrew Reedick
http://svn.haxx.se/users/archive-2013-09/0116.shtml
http://svn.haxx.se/users/archive-2013-09/0138.shtml
Review by: rhuijben
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=1523666&r1=1523665&r2=1523666&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Mon Sep 16 14:21:03 2013
@@ -10715,7 +10715,7 @@ log_find_operative_revs(void *baton,
suffix = svn_relpath_skip_ancestor(subtree_missing_this_rev,
source_rel_path);
- if (suffix)
+ if (suffix && suffix[0] != '\0')
{
missing_path = apr_pstrmemdup(pool, path,
strlen(path) - strlen(suffix) - 1);