From 9fb026cb33fba809fe23eb18f997140021f1bd84 Mon Sep 17 00:00:00 2001 From: Suraj Sonawane Date: Tue, 5 Nov 2024 18:46:57 +0530 Subject: [PATCH] fs: ntfs3: fix uninit-value in ntfs_read_bh syz test Signed-off-by: Suraj Sonawane --- fs/ntfs3/fsntfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/ntfs3/fsntfs.c b/fs/ntfs3/fsntfs.c index 0fa636038..af5ba7378 100644 --- a/fs/ntfs3/fsntfs.c +++ b/fs/ntfs3/fsntfs.c @@ -1312,8 +1312,10 @@ int ntfs_read_bh(struct ntfs_sb_info *sbi, const struct runs_tree *run, u64 vbo, { int err = ntfs_read_run_nb(sbi, run, vbo, rhdr, bytes, nb); - if (err) + if (err) { + memset(rhdr, 0, sizeof(*rhdr)); return err; + } return ntfs_fix_post_read(rhdr, nb->bytes, true); } -- 2.34.1