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 19:09:24 UTC
svn commit: r1368128 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Author: stefan2
Date: Wed Aug 1 17:09:23 2012
New Revision: 1368128
URL: http://svn.apache.org/viewvc?rev=1368128&view=rev
Log:
Prevent the access violation reported here:
http://www.crash-server.com/Problem.aspx?ClientID=tsvn&ProblemID=1186
http://www.crash-server.com/Problem.aspx?ClientID=tsvn&ProblemID=1192
* subversion/libsvn_wc/wc_db.c
(read_url_txn): don't access NULL paths; return an error instead
Modified:
subversion/trunk/subversion/libsvn_wc/wc_db.c
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1368128&r1=1368127&r2=1368128&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Wed Aug 1 17:09:23 2012
@@ -8790,8 +8790,15 @@ read_url_txn(void *baton,
else
{
/* The parent of the WORKING delete, must be an addition */
- const char *work_relpath = svn_relpath_dirname(work_del_relpath,
- scratch_pool);
+ const char *work_relpath = NULL;
+
+ /* work_del_relpath should not be NULL. However, we have
+ * observed instances where that assumption was not met.
+ * Bail out in that case instead of crashing with a segfault.
+ */
+ SVN_ERR_ASSERT(work_del_relpath != NULL);
+ work_relpath = svn_relpath_dirname(work_del_relpath,
+ scratch_pool);
SVN_ERR(scan_addition(NULL, NULL, &repos_relpath, &repos_id,
NULL, NULL, NULL, NULL, NULL, NULL,