fs/squashfs: parameter check sqfs_read_metablock()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 23 Sep 2020 19:13:51 +0000 (21:13 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 29 Sep 2020 17:19:08 +0000 (13:19 -0400)
commit0ed375ebb13f8b2d69400b9df8985c8123d3fbb1
tree8af5723bec9fc6523fc95750dd0885f4dbe2edd8
parent5558af16a01d992f32051d96b55c3625d10899c4
fs/squashfs: parameter check sqfs_read_metablock()

We should check if the incoming parameter file_mapping is not NULL instead
of checking after adding an offset.

Reported-by: Coverity CID 307210
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
fs/squashfs/sqfs_inode.c