
23 Sep
2020
23 Sep
'20
9:49 p.m.
On Wed, 23 Sep 2020 21:13:51 +0200 Heinrich Schuchardt xypron.glpk@gmx.de wrote:
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
However, I wonder if this check is really useful. sqfs_read_metablock() is an internal function, so it should be up to the callers to make sure that they don't pass a NULL file_mapping argument.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com