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

Re: [PATCH] Fwd: Off by one error in SetRevisionIndex

From: Lieven Govaerts <svnlgo_at_mobsol.be>
Date: 2007-06-25 11:51:11 CEST

Tomas,

the TortoiseSVN developers have their own mailing list:
dev@tortoisesvn.tigris.org

Lieven

Tomas Kopal wrote:
> It looks like my last attempt didn't get through, so once more:
>
> -------- Original Message --------
> Subject: Off by one error in SetRevisionIndex
> Date: Thu, 21 Jun 2007 18:54:02 +0200
> From: Tomas Kopal <Tomas.Kopal@altap.cz>
> To: dev@subversion.tigris.org
>
>
>
> Hi all,
> I started using TortoiseSVN recently, but it keeps crashing on me. So
> grabbed the sources and went looking for problems. So, here is the first
> one I found :-).
>
> Index: RevisionIndex.cpp
> ===================================================================
> --- RevisionIndex.cpp (revision 9818)
> +++ RevisionIndex.cpp (working copy)
> @@ -82,11 +82,11 @@
> else
> {
> revision_t size = (revision_t)indices.size();
> - if (revision - firstRevision > size)
> + if (revision - firstRevision >= size)
> {
> // efficently grow on the upper end
>
> - size_t toAdd = max (size, revision - firstRevision - size);
> + size_t toAdd = max (size, revision - firstRevision + 1 - size);
> indices.insert (indices.end(), toAdd, NO_INDEX);
> }
> }
>
>
>
> Please, someone with more knowledge of the code, check the lower bound
> growing too, I think it may suffer from the same problem.
>
> Regards
>
> Tomas
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jun 25 11:47:08 2007

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.