From e2167d0724c8d607e7627aaa0ceb77cc84642eee Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Wed, 23 Jun 2010 11:44:34 +1000 Subject: [PATCH] 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 --- index.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5