From: Tomas Mraz Date: Thu, 10 Jun 2021 14:55:37 +0000 (+0200) Subject: fuzz/asn1parse: Use BIO_s_mem() as fallback output X-Git-Tag: openssl-3.0.0-beta1~95 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=541d4f19957727d331c2e4353a26841f5d1fe32d;p=thirdparty%2Fopenssl.git fuzz/asn1parse: Use BIO_s_mem() as fallback output /dev/null is not available everywhere. Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/15672) --- diff --git a/fuzz/asn1parse.c b/fuzz/asn1parse.c index ac888e535ae..72b0df8a461 100644 --- a/fuzz/asn1parse.c +++ b/fuzz/asn1parse.c @@ -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);