diff options
author | Tom Rini <trini@konsulko.com> | 2020-09-19 08:31:52 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-09-19 08:31:52 -0400 |
commit | 667ab37d586e702bc745934afff3dae2f67a2257 (patch) | |
tree | dbd488a96e815e5604339d6c6fa1d34ca4179d72 /fs/squashfs/sqfs_inode.c | |
parent | 98f3ee09d096c6c1bc49e08d805f6354dffb0e59 (diff) | |
parent | 9989fb18bd5b6e2afe5f296b4c414f8d1c73d527 (diff) |
Merge branch '2020-09-18-assorted-bugfixes'
- SquashFS Coverity fixes
- bitflip fix in the alternate memtest command
- Disable networking on bcmstb boards where we didn't have any network
drivers enabled.
Diffstat (limited to 'fs/squashfs/sqfs_inode.c')
-rw-r--r-- | fs/squashfs/sqfs_inode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/squashfs/sqfs_inode.c b/fs/squashfs/sqfs_inode.c index 1387779a85..1368f3063c 100644 --- a/fs/squashfs/sqfs_inode.c +++ b/fs/squashfs/sqfs_inode.c @@ -142,8 +142,11 @@ int sqfs_read_metablock(unsigned char *file_mapping, int offset, u16 header; data = file_mapping + offset; + if (!data) + return -EFAULT; + header = get_unaligned((u16 *)data); - if (!header || !data) + if (!header) return -EINVAL; *compressed = SQFS_COMPRESSED_METADATA(header); |