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

Re: svn commit: r33617 - trunk/subversion/libsvn_subr

From: Lieven Govaerts <svnlgo_at_mobsol.be>
Date: Mon, 13 Oct 2008 20:20:05 +0200

Stefan,

I'm sorry I'm repeating myself, but this change would be so much better
if you added a testcase demonstrating the issue.

So, can you give an example of a url/path demonstrating this memory
corruption?

Lieven

steveking_at_tigris.org wrote:
> Author: steveking
> Date: Mon Oct 13 10:30:56 2008
> New Revision: 33617
>
> Log:
> Fix memory corruption bug. When copying strings, do not copy over the
> terminating null char of the string.
>
> * subversion/libsvn_subr/dirent_uri.c:
> (canonicalize): check for null char in while loop
>
> Modified:
> trunk/subversion/libsvn_subr/dirent_uri.c
>
> Modified: trunk/subversion/libsvn_subr/dirent_uri.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_subr/dirent_uri.c?pathrev=33617&r1=33616&r2=33617
> ==============================================================================
> --- trunk/subversion/libsvn_subr/dirent_uri.c Mon Oct 13 09:03:30 2008 (r33616)
> +++ trunk/subversion/libsvn_subr/dirent_uri.c Mon Oct 13 10:30:56 2008 (r33617)
> @@ -201,7 +201,7 @@ canonicalize(path_type_t type, const cha
> src = seg;
>
> /* Found a hostname, convert to lowercase and copy to dst. */
> - while (*src != '/')
> + while (*src && (*src != '/'))
> *(dst++) = tolower((*src++));
> *(dst++) = *(src++);

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-10-13 20:19:24 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.