From: Andrew Dinh Date: Mon, 11 Aug 2025 10:07:15 +0000 (+0700) Subject: Add NULL check X-Git-Tag: openssl-3.5.3~71 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=85f39c62f599ff55f36868004a2856c13b0b59f8;p=thirdparty%2Fopenssl.git Add NULL check Reviewed-by: Saša Nedvědický Reviewed-by: Paul Yang Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale Reviewed-by: Neil Horman (Merged from https://github.com/openssl/openssl/pull/28221) (cherry picked from commit 24f72a5aaab0243c136e1402b54348fda9cdbc36) --- diff --git a/crypto/x509/v3_attrdesc.c b/crypto/x509/v3_attrdesc.c index 45958e9affd..84f66758946 100644 --- a/crypto/x509/v3_attrdesc.c +++ b/crypto/x509/v3_attrdesc.c @@ -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); }