Re: [PATCH V3] lib: 842: Improve error handling in sw842_compress()

From: Herbert Xu
Date: Mon Jan 13 2025 - 22:45:57 EST


On Sun, Jan 05, 2025 at 12:19:54AM +0530, Tanya Agarwal wrote:
> From: Tanya Agarwal <tanyaagarwal25699@xxxxxxxxx>
>
> The static code analysis tool "Coverity Scan" pointed the following
> implementation details out for further development considerations:
> CID 1309755: Unused value
> In sw842_compress: A value assigned to a variable is never used. (CWE-563)
> returned_value: Assigning value from add_repeat_template(p, repeat_count)
> to ret here, but that stored value is overwritten before it can be used.
>
> Conclusion:
> Add error handling for the return value from an add_repeat_template()
> call.
>
> Fixes: 2da572c959dd ("lib: add software 842 compression/decompression")
> Signed-off-by: Tanya Agarwal <tanyaagarwal25699@xxxxxxxxx>
> ---
> V3: update title and reorganize commit description
> V2: add Fixes tag and reword commit description
>
> Coverity Link:
> https://scan5.scan.coverity.com/#/project-view/63683/10063?selectedIssue=1309755
>
> lib/842/842_compress.c | 2 ++
> 1 file changed, 2 insertions(+)

Please resend via linux-crypto@xxxxxxxxxxxxxxx. The MAINTAINERS
entry should be updated to include the mailing list.

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