From 21cc75184ea308b89c93532da384321cea606bc8 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 16 Dec 2023 16:22:08 +0000 Subject: [PATCH] squashfs: fix parsing of extended file inodes Before this change it was accidentally using the size of the basic file inode as the offset of the blocklist. --- filesystem/squashfs/inode.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/filesystem/squashfs/inode.go b/filesystem/squashfs/inode.go index 30d8da2a..a08852b8 100644 --- a/filesystem/squashfs/inode.go +++ b/filesystem/squashfs/inode.go @@ -536,8 +536,8 @@ func parseExtendedFile(b []byte, blocksize int) (*extendedFile, int, error) { } // do we have enough data left to read those? extra = blockListSize * 4 - if len(b[16:]) >= extra { - d.blockSizes = parseFileBlockSizes(b[16:], blockListSize) + if len(b[40:]) >= extra { + d.blockSizes = parseFileBlockSizes(b[40:], blockListSize) extra = 0 } return d, extra, nil