Julian Foad wrote:
> On Wed, 2008-09-24 at 10:49 +0200, Stefan Küng wrote:
>> Julian Foad wrote:
>>> On Tue, 2008-09-23 at 10:20 -0700, steveking_at_tigris.org wrote:
>>>> Author: steveking
>>>> Date: Tue Sep 23 10:20:15 2008
>>>> New Revision: 33254
>>>>
>>>> Log:
>>>> Prevent segfault when Windows paths with forward slashes are passed.
>>>>
>>>> * subversion/libsvn_subr/path.c
>>>> (svn_path_canonicalize): only treat the path as an URI if the hostname is
>>>> valid.
>>> I'm trying to understand this change. What is an example of a path that
>>> made it seg-fault? Do you know why it seg-faults on Windows but not un
>>> Linux?
>> I haven't tested on Linux, but I assume that if it would crash with
>> forward-slash paths, that would have been noticed immediately.
>>
>> A windows path has a colon and a slash (e.g., C:/) which I think is
>> interpreted by apr as an url part, and I'd say that's the reason why
>> apr_uri_parse doesn't return with an error.
>
> On my copy of APR (v1.2.2), apr_uri_parse("C:/") gives {scheme = 0x0,
> hostinfo = 0x0, user = 0x0, password = 0x0, hostname = 0x0, port_str =
> 0x0, path = 0x8080e50 "C:/", query = 0x0, fragment = 0x0, hostent = 0x0,
> port = 0, is_initialized = 1, dns_looked_up = 0, dns_resolved = 0}.
apr v1.3.3, apr-util v1.3.4, apr_uri_parse("c:/") gives:
scheme = "c", hostinfo = 0x0, user = 0x0, password = 0x0, hostname =
0x0, port_str = 0x0, path = "/", query = 0x0, fragment = 0x0, hostent =
0x0, port = 0, is_initialized = 1, dns_looked_up = 0, dns_resolved = 0
apr_uri_parse("c:/folder") gives:
scheme = "c", hostinfo = 0x0, user = 0x0, password = 0x0, hostname =
0x0, port_str = 0x0, path = "/folder", query = 0x0, fragment = 0x0,
hostent = 0x0, port = 0, is_initialized = 1, dns_looked_up = 0,
dns_resolved = 0
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
Received on 2008-09-24 18:03:03 CEST