From 541d4f19957727d331c2e4353a26841f5d1fe32d Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Thu, 10 Jun 2021 16:55:37 +0200 Subject: 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) --- fuzz/asn1parse.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fuzz') diff --git a/fuzz/asn1parse.c b/fuzz/asn1parse.c index ac888e535a..72b0df8a46 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); -- cgit v1.2.1