[openssl/openssl] 450f96: Fix Coverity issues in HPKE

Shane noreply at github.com
Tue Nov 29 13:00:55 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 450f96e965f0d5e89737755364df5933b5085639
      https://github.com/openssl/openssl/commit/450f96e965f0d5e89737755364df5933b5085639
  Author: slontis <shane.lontis at oracle.com>
  Date:   2022-11-29 (Tue, 29 Nov 2022)

  Changed paths:
    M crypto/hpke/hpke.c
    M test/hpke_test.c

  Log Message:
  -----------
  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 at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19774)




More information about the openssl-commits mailing list