]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix use after free bugs for public_keys and private_keys in evp_test
authorTobias Brick <tobiasb@microsoft.com>
Thu, 17 Apr 2025 14:50:36 +0000 (14:50 +0000)
committerTomas Mraz <tomas@openssl.org>
Mon, 5 May 2025 14:03:49 +0000 (16:03 +0200)
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27421)

(cherry picked from commit 81e8b5a5038b4952a22b2dc9fcf9994615ee8dc4)

test/evp_test.c

index 2701040dabe7fcea1fd0c1f53ddc46da709a5206..86b8198643aee43de25f9a046662cec0a17f9404 100644 (file)
@@ -3960,7 +3960,9 @@ static int run_file_tests(int i)
     clear_test(t);
 
     free_key_list(public_keys);
+    public_keys = NULL;
     free_key_list(private_keys);
+    private_keys = NULL;
     BIO_free(t->s.key);
     c = t->s.errors;
     OPENSSL_free(t);