[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Bug in svn_repos_find_root_path on Windows?

From: Vlad Georgescu <vgeorgescu_at_gmail.com>
Date: 2006-11-28 21:12:27 CET

On 11/28/06, Daniel Rall <dlr@collab.net> wrote:
> On Sun, 26 Nov 2006, Vlad Georgescu wrote:
> ...
> > It seems that, on Windows, svn_repos_find_root_path will get stuck in
> > an infinite loop if it is given an absolute path that doesn't actually
> > contain a repository root. I discovered this after mistyping the root
> > path when invoking svnserve. The relevant code is this:
> >
> > while (1)
> > {
> > /* Try to decode the path, so we don't fail if it contains characters
> > that aren't supported by the OS filesystem. The subversion fs
> > isn't restricted by the OS filesystem character set. */
> > err = svn_utf_cstring_from_utf8(&decoded, candidate, pool);
> > if (!err && check_repos_path(candidate, pool))
> > break;
> > svn_error_clear(err);
> > if (candidate[0] == '\0' || strcmp(candidate, "/") == 0)
> > return NULL;
> > candidate = svn_path_dirname(candidate, pool);
> > }
> >
> > Notice that it only gets out of the loop when it encounters the Unix
> > root directory. The following patch fixes this problem:
> >
> > [[[
> > * subversion/libsvn_repos/repos.c
> > (svn_repos_find_root_path): Check that we reached the filesystem
> > root in a cross-platform
> > manner.
> > ]]]
>
> Thanks Vlad, committed in r22483.

On a related note, shouldn't svnserve check the validity of the --root
argument? That's how I ran into this problem in the first place.

-- 
Vlad
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 28 21:12:53 2006

This is an archived mail posted to the Subversion Dev mailing list.