VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Colin Ian King <colin.king@canonical.com> 2018-10-30 15:06:35 -0700 committer: Linus Torvalds <torvalds@linux-foundation.org> 2018-10-31 08:54:13 -0700 commit: 6c9a3f843a29d6894dfc40df338b91dbd78f0ae3 parent: 8cd3cb5061730af085a3f9890a3352f162b4e20c
Commit Summary:
fs/hfs/extent.c: fix array out of bounds read of array extent
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/fs/hfs/extent.c b/fs/hfs/extent.c
index 5f1ff97a3b98..263d5028d9d1 100644
--- a/fs/hfs/extent.c
+++ b/fs/hfs/extent.c
@@ -304,7 +304,7 @@ int hfs_free_fork(struct super_block *sb, struct hfs_cat_file *file, int type)
 		return 0;
 
 	blocks = 0;
-	for (i = 0; i < 3; extent++, i++)
+	for (i = 0; i < 3; i++)
 		blocks += be16_to_cpu(extent[i].count);
 
 	res = hfs_free_extents(sb, extent, blocks, blocks);