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 2012/08/01 17:46:12 UTC
svn commit: r1368065 - /subversion/trunk/subversion/libsvn_wc/node.c
Author: stefan2
Date: Wed Aug 1 15:46:11 2012
New Revision: 1368065
URL: http://svn.apache.org/viewvc?rev=1368065&view=rev
Log:
Prevent the access violation reported here:
https://www.crash-server.com/Problem.aspx?ClientID=tsvn&ProblemID=1015
* subversion/libsvn_wc/node.c
(svn_wc__internal_get_origin): svn_wc__db_scan_addition may return a NULL
original_repos_relpath according to its docstring. Check for that
condition before accessing the path.
Modified:
subversion/trunk/subversion/libsvn_wc/node.c
Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1368065&r1=1368064&r2=1368065&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Wed Aug 1 15:46:11 2012
@@ -1379,6 +1379,15 @@ svn_wc__internal_get_origin(svn_boolean_
return SVN_NO_ERROR; /* Local addition */
}
+ /* We don't know how the following error condition can be fulfilled
+ * but we have seen that happening in the wild. Better to create
+ * an error than a SEGFAULT. */
+ if (status == svn_wc__db_status_incomplete && !original_repos_relpath)
+ return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
+ _("Incomplete copy information on path '%s'."),
+ svn_dirent_local_style(local_abspath,
+ scratch_pool));
+
*repos_relpath = svn_relpath_join(
original_repos_relpath,
svn_dirent_skip_ancestor(op_root_abspath,