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

Re: svn commit: r33267 - in trunk/subversion: include libsvn_client libsvn_subr

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 25 Sep 2008 14:31:07 +0100

On Thu, 2008-09-25 at 08:12 -0400, Ed Price wrote:
> [...]
> > + /* Binary search for the lowest position at which to insert KEY. */
> > + while (lower <= upper)
> > + {
> > + int try = (lower + upper) / 2;
> [...]
>
> Potential overflow bug, yes?
>
> http://googleresearch.blogspot.com/2006/06/extra-extra-read-all-about-it-nearly.html

Heh. Yes, on an array with more than [INTMAX/2] elements, the
calculation would have overflowed.

Committed revision 33292.

Thanks!

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-09-25 15:31:27 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.