diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/squashfs/sqfs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c index f668c26472e..9cb8b4afcdd 100644 --- a/fs/squashfs/sqfs.c +++ b/fs/squashfs/sqfs.c @@ -178,6 +178,11 @@ static int sqfs_frag_lookup(u32 inode_fragment_index, goto out; } + if (SQFS_METADATA_SIZE(header) > SQFS_METADATA_BLOCK_SIZE) { + ret = -EINVAL; + goto out; + } + entries = malloc(SQFS_METADATA_BLOCK_SIZE); if (!entries) { ret = -ENOMEM; |
