Re: [PATCH v2] crypto: octeontx2: fix potential null pointer access

From: Herbert Xu
Date: Fri Jun 10 2022 - 05:20:35 EST


On Wed, Jun 01, 2022 at 01:38:59PM +0530, Shijith Thotton wrote:
> Added missing checks to avoid null pointer dereference.
>
> The patch fixes below issue reported by klocwork tool:
> . Pointer 'strsep( &val, ":" )' returned from call to function 'strsep'
> at line 1608 may be NULL and will be dereferenced at line 1608. Also
> there are 2 similar errors on lines 1620, 1632 in otx2_cptpf_ucode.c.
>
> Signed-off-by: Shijith Thotton <sthotton@xxxxxxxxxxx>
> ---
> v2:
> * Removed unwanted check for pcim_iomap_table.
>
> .../crypto/marvell/octeontx2/otx2_cptpf_ucode.c | 15 ++++++++++++---
> 1 file changed, 12 insertions(+), 3 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt