mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
fuzz/asn1parse: Use BIO_s_mem() as fallback output
/dev/null is not available everywhere. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15672)
This commit is contained in:
parent
20778ea7da
commit
541d4f1995
@ -24,6 +24,8 @@ static BIO *bio_out;
|
||||
int FuzzerInitialize(int *argc, char ***argv)
|
||||
{
|
||||
bio_out = BIO_new_file("/dev/null", "w");
|
||||
if (bio_out == NULL)
|
||||
bio_out = BIO_new(BIO_s_mem());
|
||||
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