You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2014/09/07 11:08:55 UTC
svn commit: r1622987 - /subversion/trunk/subversion/libsvn_fs_fs/low_level.c
Author: brane
Date: Sun Sep 7 09:08:55 2014
New Revision: 1622987
URL: http://svn.apache.org/r1622987
Log:
Follow up to r1622926: Use the correct canonicalization check for FS paths.
* subversion/libsvn_fs_fs/low_level.c
(read_change, svn_fs_fs__read_noderev): Use svn_fspath__is_canonical
instead of the (incorrect, platform-specific) svn_dirent_is_canonical.
Modified:
subversion/trunk/subversion/libsvn_fs_fs/low_level.c
Modified: subversion/trunk/subversion/libsvn_fs_fs/low_level.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/low_level.c?rev=1622987&r1=1622986&r2=1622987&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/low_level.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/low_level.c Sun Sep 7 09:08:55 2014
@@ -21,13 +21,13 @@
*/
#include "svn_private_config.h"
-#include "svn_dirent_uri.h"
#include "svn_hash.h"
#include "svn_pools.h"
#include "svn_sorts.h"
#include "private/svn_sorts_private.h"
#include "private/svn_string_private.h"
#include "private/svn_subr_private.h"
+#include "private/svn_fspath.h"
#include "../libsvn_fs/fs-loader.h"
@@ -379,7 +379,7 @@ read_change(change_t **change_p,
}
/* Get the changed path. */
- if (*last_str != '/' || !svn_dirent_is_canonical(last_str, scratch_pool))
+ if (!svn_fspath__is_canonical(last_str))
return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
_("Invalid path in changes line"));
@@ -399,8 +399,7 @@ read_change(change_t **change_p,
last_str = line->data;
SVN_ERR(parse_revnum(&info->copyfrom_rev, (const char **)&last_str));
- if ( *last_str != '/'
- || !svn_dirent_is_canonical(last_str, scratch_pool))
+ if (!svn_fspath__is_canonical(last_str))
return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
_("Invalid copy-from path in changes line"));
@@ -875,7 +874,7 @@ svn_fs_fs__read_noderev(node_revision_t
}
else
{
- if (*value != '/' || !svn_dirent_is_canonical(value, scratch_pool))
+ if (!svn_fspath__is_canonical(value))
return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
_("Non-canonical cpath field in node-rev '%s'"),
noderev_id);
@@ -900,7 +899,7 @@ svn_fs_fs__read_noderev(node_revision_t
{
SVN_ERR(parse_revnum(&noderev->copyroot_rev, (const char **)&value));
- if (*value != '/' || !svn_dirent_is_canonical(value, scratch_pool))
+ if (!svn_fspath__is_canonical(value))
return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
_("Malformed copyroot line in node-rev '%s'"),
noderev_id);