diff options
author | tb <> | 2024-05-11 18:52:52 +0000 |
---|---|---|
committer | tb <> | 2024-05-11 18:52:52 +0000 |
commit | ba35bf8972498839346039bd971a861b500e308f (patch) | |
tree | 08aaa0137bf5a14ceabc4afb4071407ab4233eda /src | |
parent | ba65e7820ed23aea4eb31c6a5f0e3004d6814a96 (diff) | |
download | openbsd-ba35bf8972498839346039bd971a861b500e308f.tar.gz openbsd-ba35bf8972498839346039bd971a861b500e308f.tar.bz2 openbsd-ba35bf8972498839346039bd971a861b500e308f.zip |
Make two NULL checks more explicit
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/x509/x509_lib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/x509/x509_lib.c b/src/lib/libcrypto/x509/x509_lib.c index 1772692f2b..45ed9405fd 100644 --- a/src/lib/libcrypto/x509/x509_lib.c +++ b/src/lib/libcrypto/x509/x509_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_lib.c,v 1.18 2024/05/11 18:48:47 tb Exp $ */ | 1 | /* $OpenBSD: x509_lib.c,v 1.19 2024/05/11 18:52:52 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -176,10 +176,10 @@ X509V3_EXT_d2i(X509_EXTENSION *ext) | |||
176 | const X509V3_EXT_METHOD *method; | 176 | const X509V3_EXT_METHOD *method; |
177 | const unsigned char *p; | 177 | const unsigned char *p; |
178 | 178 | ||
179 | if (!(method = X509V3_EXT_get(ext))) | 179 | if ((method = X509V3_EXT_get(ext)) == NULL) |
180 | return NULL; | 180 | return NULL; |
181 | p = ext->value->data; | 181 | p = ext->value->data; |
182 | if (method->it) | 182 | if (method->it != NULL) |
183 | return ASN1_item_d2i(NULL, &p, ext->value->length, method->it); | 183 | return ASN1_item_d2i(NULL, &p, ext->value->length, method->it); |
184 | return method->d2i(NULL, &p, ext->value->length); | 184 | return method->d2i(NULL, &p, ext->value->length); |
185 | } | 185 | } |