]> 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:30 +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 0a09befc3334aec30a708401951e7242d626a06f..08abdf3648eec0bf48e6714438a1b1c14426c077 100644 (file)
@@ -5068,7 +5068,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);