[openssl/openssl] e36637: Fix incomplete check on EVP_CIPHER_param_to_asn1()

Niels Dossche noreply at github.com
Wed Feb 1 23:16:40 UTC 2023


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: e3663717fc16bd140f54ee7f1600bdced7f9ea66
      https://github.com/openssl/openssl/commit/e3663717fc16bd140f54ee7f1600bdced7f9ea66
  Author: ndossche <niels.dossche at ugent.be>
  Date:   2023-02-02 (Thu, 02 Feb 2023)

  Changed paths:
    M crypto/pkcs7/pk7_doit.c

  Log Message:
  -----------
  Fix incomplete check on EVP_CIPHER_param_to_asn1()

That function is a wrapper around evp_cipher_param_to_asn1_ex() which
can return 0 as an error value via its ret <= 0 check [1].
Furthermore, all other callers of this function check against <= 0
instead of < 0 and this is also in line with what the documentation
tells us. Fix the incomplete check by changing it to <= 0 as well.

CLA: trivial

[1] https://github.com/openssl/openssl/blob/114d99b46bfb212ffc510865df317ca2c1542623/crypto/evp/evp_lib.c#L164-L165

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20180)




More information about the openssl-commits mailing list