[PATCH] fs/ntfs3: remove redundant if-block in check_attr()
Matvey Kovalev <[email protected]> Sun, 19 Jul 2026 23:25:16 +0300
| Newsgroups | dev.linux.lists.ntfs3,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Condition of this if-block repeats another one from if-block above. So, condition is always false. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Matvey Kovalev <[email protected]> --- fs/ntfs3/fslog.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/ntfs3/fslog.c b/fs/ntfs3/fslog.c index f038c799e7ac..7c40eff69959 100644 --- a/fs/ntfs3/fslog.c +++ b/fs/ntfs3/fslog.c @@ -2753,9 +2753,6 @@ static inline bool check_attr(const struct MFT_REC *rec, return false; } - if (run_off > asize) - return false; - if (run_unpack(NULL, sbi, 0, svcn, evcn, svcn, Add2Ptr(attr, run_off), asize - run_off) < 0) { return false; -- 2.54.0