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

Re: [PATCH] Fix corner case bug in libsvn_diff

From: Sander Striker <striker_at_apache.org>
Date: 2006-02-08 01:33:53 CET

Peter N. Lundblad wrote:
> Hi,
>
> While testing the new diff stuff (ignore whitespace etc.), I changed the
> token read chunk size from 128K to 4, and found an old corner case bug.
> The problem is that the code will return a spurious empty token if the
> file is exactly n*CHUNK_SIZE bytes long (n>0). This confuses the diff
> algorithm, which thinks that the file has an extra line. Attached is a
> fix for this, which seems a little clumsy. If anyone has a better
> solution, feel free to suggest/commit.

The fix makes sense. Though I'd avoid calculating the hash as well.
 
> Note that this is in 1.3 (and probably earlier)

Yes, this has probably been there since the start. Nice catch.

Sander

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Feb 8 01:34:36 2006

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.