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

Crash double slashes in URL:s

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2004-05-28 22:24:25 CEST

Hi,

I did something like this:
export R
R=file:///.../testrepos/
svn cp -m m $R/test1 $R/test2

and got a segfault. this is because repos_to_repos copy opens the common
ancestor of the source and dest, which in this case ends with a slash.
Then split_URL in ra_local treats the directory part of the URL as a
normalized path, so the assert(is_normalized) fails in svn_path_join().

I also tried something similar over HTTP and it crashes further down in
repos_to_repos_copy, where it constructs the commit items.

I think it is a bad idea to treat a URL as a normalized path without
ensuring that it fullfills all requirements of a normalized path. An easy
fix would be to nromalize the top_url in repos_to_repos_copy, but I'm not
sure if this is the Right Thing (TM). Do we need something that normalizes
URLs instead? Then it will need to, for example, remove double slashes
inside the path component. BTW, I don't know if it is valid URL syntax,
but still it shouldn't crash.

Any ideas?

//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 28 22:15:06 2004

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.