Re: [v3 PATCH 7/8] crypto: scomp - Remove support for most non-trivial destination SG lists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 10, 2025 at 10:31:06PM +0300, Dan Carpenter wrote:
>
> New smatch warnings:
> crypto/scompress.c:180 scomp_acomp_comp_decomp() error: we previously assumed 'req->dst' could be null (see line 174)

I think this is a false positive.

> 5b855462cc7e3f3 Herbert Xu                2025-03-09 @174  	if (req->dst && !dlen)
>                                                                     ^^^^^^^^
> Is this check necessary?

This is not trying to catch a null req->dst, but it's trying to
detect an combination of a non-null req->dst with a zero dlen.

A zero dlen is used to allocate req->dst on demand, which would
conflict with a non-null req->dst.

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




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux