]> git.dujemihanovic.xyz Git - u-boot.git/commit
kwbimage: check return value of image_get_csk_index
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 17 Aug 2021 05:11:58 +0000 (07:11 +0200)
committerStefan Roese <sr@denx.de>
Wed, 1 Sep 2021 06:09:24 +0000 (08:09 +0200)
commitf0317d788221828089fe54433cf5c502d748ef77
treeeac96cac9cd154b1dc2e284c445ebe3d2cd94c75
parentf858bb2e6c191da3981838937950cb3c98e488fe
kwbimage: check return value of image_get_csk_index

image_get_csk_index() may return -1 in case of an error. Don't use this
value as index.

This resolves Coverity CID 338488
Memory - illegal accesses  (NEGATIVE_RETURNS)

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Pali Rohár <pali@kernel.org>
tools/kwbimage.c