]> git.ipfire.org Git - thirdparty/openssl.git/commit - test/evp_extra_test.c
test: fix double free problems.
authorPauli <pauli@openssl.org>
Sun, 18 Apr 2021 22:59:37 +0000 (08:59 +1000)
committerPauli <pauli@openssl.org>
Tue, 20 Apr 2021 23:17:22 +0000 (09:17 +1000)
commit6bcbc3698557739da03495920a57be4ffe219fa4
tree15f547c9f2986da5539cc29a130a02d6d0c93f38
parentefe8d69daa1a68be0a7f0f73220947c848e7ed1d
test: fix double free problems.

In function test_EVP_PKEY_ffc_priv_pub, params is freed via OSSL_PARAM_free() at line 577.
If the condition at line 581 is true, the execution will goto err, and params will be freed again at line 630.

The same problem also happens at line 593 and line 609, which causes two double free bugs.

Bugs reported by @Yunlongs

Fixes 14916

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14921)
test/evp_extra_test.c