Blame SOURCES/e2fsprogs-1.45.6-e2fsck-fix-off-by-one-check-when-validating-depth-of.patch

a77133
From 669a17d35cdfd9cf5b76e97016fae2df2d72e768 Mon Sep 17 00:00:00 2001
a77133
From: Theodore Ts'o <tytso@mit.edu>
a77133
Date: Fri, 10 Apr 2020 00:30:52 -0400
a77133
Subject: [PATCH 07/46] e2fsck: fix off-by-one check when validating depth of
a77133
 an htree
a77133
Content-Type: text/plain
a77133
a77133
Fixes: 3f0cf6475399 ("e2fsprogs: add support for 3-level htree")
a77133
a77133
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
a77133
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
a77133
---
a77133
 e2fsck/pass1.c | 2 +-
a77133
 1 file changed, 1 insertion(+), 1 deletion(-)
a77133
a77133
diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c
a77133
index c9e8bf82..38afda48 100644
a77133
--- a/e2fsck/pass1.c
a77133
+++ b/e2fsck/pass1.c
a77133
@@ -2685,7 +2685,7 @@ static int handle_htree(e2fsck_t ctx, struct problem_context *pctx,
a77133
 		return 1;
a77133
 
a77133
 	pctx->num = root->indirect_levels;
a77133
-	if ((root->indirect_levels > ext2_dir_htree_level(fs)) &&
a77133
+	if ((root->indirect_levels >= ext2_dir_htree_level(fs)) &&
a77133
 	    fix_problem(ctx, PR_1_HTREE_DEPTH, pctx))
a77133
 		return 1;
a77133
 
a77133
-- 
a77133
2.35.1
a77133