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

Re: Possibly wrong string comparisons in SVN

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2004-10-26 15:01:04 CEST

Roland Ruedenauer wrote:
> There seem to be some places in the SVN code where inadvertendly a
> string prefix match is performed where a full match was desired.
>
> 1) libsvn_ra_local/split_url.c line 64
>
> if ((strncmp (hostname, "localhost", 9) != 0))

Well caught. Thanks. I have confirmed this: "svn ls
file://localhoster.collab.net/home/julianfoad/vcs/sandbox/" proceeds to list
the contents of my local test repository.

> 2) libsvn_repos/fs-wrap.c line 330 and 332
>
> /* Only svn:author and svn:date are fetchable. */
> if ((strncmp (propname, SVN_PROP_REVISION_AUTHOR,
> strlen(SVN_PROP_REVISION_AUTHOR)) != 0)
> && (strncmp (propname, SVN_PROP_REVISION_DATE,
> strlen(SVN_PROP_REVISION_DATE)) != 0))

Would you like to prepare a patch that fixes these, with a log message, in the
style documented in "HACKING"? That would be very helpful; but if you don't
have time, just say so.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 26 15:01:24 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.