]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix mem leak in ECDSA_sign().
authorslontis <shane.lontis@oracle.com>
Tue, 21 Mar 2023 06:06:06 +0000 (16:06 +1000)
committerTodd Short <todd.short@me.com>
Fri, 31 Mar 2023 18:57:47 +0000 (14:57 -0400)
commit4befe81a99b89c52b749a87eece82c1cba4fab12
treed9f7b48b1ab3ddb6e2eb2bc781c653f600ab3c6b
parent027226eb229c41d7066366a8b9ef8241da7500bd
Fix mem leak in ECDSA_sign().

Similiar to the issue found in PR #20553 for DSA_sign().
ECDSA_sign() leaked memory if the signature was NULL
when i2d_ECDSA_SIG was called.

Note that this does not affect the higher level EVP
functions as they correctly handle NULL.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/20554)
crypto/ec/ecdsa_ossl.c
crypto/sm2/sm2_sign.c
test/ecdsatest.c