From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Wed, 23 Sep 2020 21:49:41 +0200 Subject: [PATCH 1/1] fs/squashfs: parameter check sqfs_read_metablock() In-Reply-To: <20200923191351.33474-1-xypron.glpk@gmx.de> References: <20200923191351.33474-1-xypron.glpk@gmx.de> Message-ID: <20200923214941.5a39daf1@windsurf> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, 23 Sep 2020 21:13:51 +0200 Heinrich Schuchardt 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 Acked-by: Thomas Petazzoni 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