Add NULL check

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28221)
This commit is contained in:
Andrew Dinh 2025-08-11 17:07:15 +07:00 committed by Neil Horman
parent c0527256d2
commit 24f72a5aaa
1 changed files with 2 additions and 0 deletions

View File

@ -67,6 +67,8 @@ static int i2r_HASH(X509V3_EXT_METHOD *method,
}
if (BIO_printf(out, "%*sHash Value: ", indent, "") <= 0)
return 0;
if (hash->hashValue == NULL)
return 0;
return ossl_bio_print_hex(out, hash->hashValue->data, hash->hashValue->length);
}