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 2015/01/21 18:19:52 UTC
svn commit: r1653608 - /subversion/trunk/subversion/libsvn_fs_fs/tree.c
Author: stefan2
Date: Wed Jan 21 17:19:52 2015
New Revision: 1653608
URL: http://svn.apache.org/r1653608
Log:
Follow-up to r1648612: Fix a segfault in the FSFS DAG traversal code.
* subversion/libsvn_fs_fs/tree.c
(open_path): Make sure we always take a node from POOL as our "HERE"
marker. Previously, it could come from the cache pool
in the first iteration.
Found by: kotkov
Modified:
subversion/trunk/subversion/libsvn_fs_fs/tree.c
Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.c?rev=1653608&r1=1653607&r2=1653608&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/tree.c Wed Jan 21 17:19:52 2015
@@ -1012,6 +1012,10 @@ open_path(parent_path_t **parent_path_p,
svn_pool_clear(iterpool);
+ /* The NODE in PARENT_PATH always lives in POOL, i.e. it will
+ * survive the cleanup of ITERPOOL and the DAG cache.*/
+ here = parent_path->node;
+
/* Parse out the next entry from the path. */
entry = svn_fs__next_entry_name(&next, rest, pool);
@@ -1105,10 +1109,6 @@ open_path(parent_path_t **parent_path_p,
apr_psprintf(iterpool, _("Failure opening '%s'"), path));
rest = next;
-
- /* The NODE in PARENT_PATH equals CHILD but lives in POOL, i.e.
- * it will survive the cleanup of ITERPOOL.*/
- here = parent_path->node;
}
svn_pool_destroy(iterpool);