Skip to content

Commit

Permalink
squashfs: fix parsing of extended file inodes
Browse files Browse the repository at this point in the history
Before this change it was accidentally using the size of the basic
file inode as the offset of the blocklist.
  • Loading branch information
ncw authored and deitch committed Dec 19, 2023
1 parent a51152f commit 21cc751
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions filesystem/squashfs/inode.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 21cc751

Please sign in to comment.