]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Add NULL check
authorAndrew Dinh <andrewd@openssl.org>
Mon, 11 Aug 2025 10:07:15 +0000 (17:07 +0700)
committerNeil Horman <nhorman@openssl.org>
Tue, 12 Aug 2025 18:42:54 +0000 (14:42 -0400)
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)

(cherry picked from commit 24f72a5aaab0243c136e1402b54348fda9cdbc36)

crypto/x509/v3_attrdesc.c

index 45958e9affdc708e19568aa8e4a6e45b53938d6a..84f66758946676c5bfe63f998e4548b8f1b92878 100644 (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);
 }