]> Gentwo Git Trees - linux/.git/commit
crypto: zstd - Fix compression bug caused by truncation
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 30 Sep 2025 08:08:34 +0000 (16:08 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 2 Oct 2025 07:02:44 +0000 (15:02 +0800)
commit81c1a15eb4a273eabedfcc28eb6afa4b50cb8a46
treeb7a91209d6e8d5dad0f3119edeac3b87a5b2899d
parent166c83f7789ed02dc1f25bc7bed4a1beb25343aa
crypto: zstd - Fix compression bug caused by truncation

Use size_t for the return value of zstd_compress_cctx as otherwise
negative errors will be truncated to a positive value.

Reported-by: Han Xu <han.xu@nxp.com>
Fixes: f5ad93ffb541 ("crypto: zstd - convert to acomp")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: David Sterba <dsterba@suse.com>
Tested-by: Han Xu <han.xu@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/zstd.c