don't return uninitialized memory from bdiff.blocks()
bdiff.blocks() returns a dummy match at the end of both files; the
length of that chunk is never set, so it will sometimes contain random
heap garbage. There are apparently workarounds for this elsewhere:
# bdiff sometimes gives huge matches past eof, this check eats them,
--- a/mercurial/bdiff.c Mon Feb 19 10:08:59 2007 +0100
+++ b/mercurial/bdiff.c Tue Feb 20 22:20:16 2007 +0100
@@ -251,8 +251,8 @@
if (pos && l.base && t) {
/* generate the matching block list */
recurse(a, b, pos, 0, an, 0, bn, &l);
- l.head->a1 = an;
- l.head->b1 = bn;
+ l.head->a1 = l.head->a2 = an;
+ l.head->b1 = l.head->b2 = bn;
l.head++;
}