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/12/25 13:53:32 UTC
svn commit: r1553376 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c
Author: stefan2
Date: Wed Dec 25 12:53:31 2013
New Revision: 1553376
URL: http://svn.apache.org/r1553376
Log:
The file context created in add_file() is supposed to survive beyond the
end of function, so it needs its own copy of copy_path.
The failure scenario was observed in git-svn usage, with errors like
perl: subversion/libsvn_subr/dirent_uri.c:2489:
svn_fspath__skip_ancestor:
Assertion `svn_fspath__is_canonical(child_fspath)' failed.
* subversion/libsvn_ra_serf/commit.c
(add_file): All members of the new_file struct shall have
the same lifetime as the struct itself.
Path by: Roman Kagan (rkagan<{at}>mail.ru)
Modified:
subversion/trunk/subversion/libsvn_ra_serf/commit.c
Modified: subversion/trunk/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/commit.c?rev=1553376&r1=1553375&r2=1553376&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/commit.c Wed Dec 25 12:53:31 2013
@@ -1844,7 +1844,7 @@ add_file(const char *path,
new_file->name = svn_relpath_basename(new_file->relpath, NULL);
new_file->added = TRUE;
new_file->base_revision = SVN_INVALID_REVNUM;
- new_file->copy_path = copy_path;
+ new_file->copy_path = apr_pstrdup(new_file->pool, copy_path);
new_file->copy_revision = copy_revision;
new_file->changed_props = apr_hash_make(new_file->pool);
new_file->removed_props = apr_hash_make(new_file->pool);