From: tb Date: Sat, 11 May 2024 18:52:52 +0000 (+0000) Subject: Make two NULL checks more explicit X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f4b64d973d0187d94a3115c5b3ffc606c69d7ba0;p=openbsd Make two NULL checks more explicit --- diff --git a/lib/libcrypto/x509/x509_lib.c b/lib/libcrypto/x509/x509_lib.c index 1772692f2bd..45ed9405fdc 100644 --- a/lib/libcrypto/x509/x509_lib.c +++ b/lib/libcrypto/x509/x509_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_lib.c,v 1.18 2024/05/11 18:48:47 tb Exp $ */ +/* $OpenBSD: x509_lib.c,v 1.19 2024/05/11 18:52:52 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -176,10 +176,10 @@ X509V3_EXT_d2i(X509_EXTENSION *ext) const X509V3_EXT_METHOD *method; const unsigned char *p; - if (!(method = X509V3_EXT_get(ext))) + if ((method = X509V3_EXT_get(ext)) == NULL) return NULL; p = ext->value->data; - if (method->it) + if (method->it != NULL) return ASN1_item_d2i(NULL, &p, ext->value->length, method->it); return method->d2i(NULL, &p, ext->value->length); }