summaryrefslogtreecommitdiff
path: root/fuzz
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2021-06-10 16:55:37 +0200
committerTomas Mraz <tomas@openssl.org>2021-06-11 09:51:14 +0200
commit541d4f19957727d331c2e4353a26841f5d1fe32d (patch)
tree91572c6121b1e4e0a50ca7a9bb2ccf1de03b52e7 /fuzz
parent20778ea7dad8c4f659dbb5dfcb4fac896e51ed6a (diff)
downloadopenssl-new-541d4f19957727d331c2e4353a26841f5d1fe32d.tar.gz
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)
Diffstat (limited to 'fuzz')
-rw-r--r--fuzz/asn1parse.c2
1 files changed, 2 insertions, 0 deletions
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);