fs/ntfs3: Use 64 bit variable to avoid 32 bit overflow
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Tue, 16 Apr 2024 06:45:09 +0000 (09:45 +0300)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Tue, 23 Apr 2024 06:34:23 +0000 (09:34 +0300)
For example, in the expression:
vbo = 2 * vbo + skip

Fixes: b46acd6a6a627 ("fs/ntfs3: Add NTFS journal")
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/fslog.c

index d9d0882..d7807d2 100644 (file)
@@ -1184,7 +1184,8 @@ out:
 static int log_read_rst(struct ntfs_log *log, bool first,
                        struct restart_info *info)
 {
-       u32 skip, vbo;
+       u32 skip;
+       u64 vbo;
        struct RESTART_HDR *r_page = NULL;
 
        /* Determine which restart area we are looking for. */