]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix Coverity issues in HPKE
authorslontis <shane.lontis@oracle.com>
Sun, 27 Nov 2022 21:49:17 +0000 (07:49 +1000)
committerTomas Mraz <tomas@openssl.org>
Tue, 29 Nov 2022 12:58:19 +0000 (13:58 +0100)
commit450f96e965f0d5e89737755364df5933b5085639
tree9b2e71e8e9d884abed8bfb998b7d041d801a5352
parent92a25e24e6ec9735dea9ec645502cb075a5f8d24
Fix Coverity issues in HPKE

CID 1517043 and 1517038: (Forward NULL) - Removed redundant check that is already
done by the caller. It was complaining that it checked for ctlen == NULL
and then did a goto that used this *ctlen.

CID 1517042 and 1517041: (Forward NULL) - Similar to above for ptlen in
hpke_aead_dec()

CID 1517040: Remove unneeded logging. This gets rid of the warning
related to taking the sizeof(&)

CID 1517039: Check returned value of  RAND_bytes_ex() in hpke_test

CID 1517038: Check return result of KEM_INFO_find() in
OSSL_HPKE_get_recomended_ikmelen. Even though this is a false positive,
it should not rely on the internals of other function calls.

Changed some goto's into returns to match OpenSSL coding guidelines.
Removed Raises from calls to _new which fail from malloc calls.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19774)
crypto/hpke/hpke.c
test/hpke_test.c