fuzz/asn1.c: Add missing check for BIO_new
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Sat, 12 Feb 2022 11:27:09 +0000 (19:27 +0800)
committerDr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com>
Sun, 20 Feb 2022 12:06:17 +0000 (13:06 +0100)
commitd1ce1b5df602e4fc64bd27b65b4b1343229007af
treecd9d80d81128de0aed21b13dc6b973e4be52c78e
parent18e046c8a2e562cf947aa2b5b4cce31bb0ff75a1
fuzz/asn1.c: Add missing check for BIO_new

Since the BIO_new may fail, the 'bio' could be NULL pointer and be used.
Therefore, it should be better to check it and skip the print if fails.

Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/17690)

(cherry picked from commit d43597c718dd6e4f2b18d5cec1eb791503a18988)
fuzz/asn1.c