mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
fuzz/asn1parse.c: Clean up non-portable code and catch malloc failure
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15722)
This commit is contained in:
parent
9d9691f78a
commit
f42b3b70d8
@ -23,9 +23,9 @@ static BIO *bio_out;
|
||||
|
||||
int FuzzerInitialize(int *argc, char ***argv)
|
||||
{
|
||||
bio_out = BIO_new_file("/dev/null", "w");
|
||||
bio_out = BIO_new(BIO_s_null()); /* output will be ignored */
|
||||
if (bio_out == NULL)
|
||||
bio_out = BIO_new(BIO_s_mem());
|
||||
return 0;
|
||||
OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
|
||||
ERR_clear_error();
|
||||
CRYPTO_free_ex_index(0, -1);
|
||||
|
Loading…
Reference in New Issue
Block a user