From: NeilBrown Date: Wed, 23 Jun 2010 01:44:34 +0000 (+1000) Subject: fix leaf_lookup for indirect blocks. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=e2167d0724c8d607e7627aaa0ceb77cc84642eee;p=LaFS.git fix leaf_lookup for indirect blocks. If the space was an exact multiple of 6 bytes, we would not consider the final entry as a possible 'next'. Signed-off-by: NeilBrown --- diff --git a/index.c b/index.c index 7bb1a9c..13e5bc9 100644 --- a/index.c +++ b/index.c @@ -1177,7 +1177,7 @@ leaf_lookup(void *bf, int len, u32 startaddr, u32 target, u32 *nextp) len -= 6; next++; *nextp = ~0UL; - while (len > 6) { + while (len >= 6) { p2 = decode48(buf); if (p2) { *nextp = next;