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

svn_path_canonicalize

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Tue, 23 Sep 2008 18:11:27 +0200

Hi,

The function svn_path_canonicalize() segfaults on trunk HEAD when a
windows path with forward slashes is passed to it (e.g.,
C:/folder/subfolder/file). Since such paths are valid on Windows too
(even though they're not the default), svn_path_canonicalize() should
not crash.

The attached patch would fix this, but I'm not sure if that's the right
way to fix this.

Can someone have a look at this?

Stefan

-- 
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.net

Index: subversion/libsvn_subr/path.c
===================================================================
--- subversion/libsvn_subr/path.c (revision 33253)
+++ subversion/libsvn_subr/path.c (working copy)
@@ -1290,7 +1290,7 @@
 
   /* Try to parse the path as an URI. */
   if (apr_uri_parse(pool, path, &host_uri) == APR_SUCCESS &&
- host_uri.scheme)
+ host_uri.scheme && host_uri.hostname)
     {
       /* convert scheme and hostname to lowercase */
       apr_size_t offset;

Received on 2008-09-23 18:11:57 CEST

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.