Skip to content

Commit

Permalink
null check
Browse files Browse the repository at this point in the history
  • Loading branch information
smittals2 committed Nov 1, 2024
1 parent 97a6706 commit 2fc2432
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/x509/v3_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid) {

const X509V3_EXT_METHOD *X509V3_EXT_get(const X509_EXTENSION *ext) {
int nid;
if ((nid = OBJ_obj2nid(ext->object)) == NID_undef) {
if (ext == NULL || (nid = OBJ_obj2nid(ext->object)) == NID_undef) {
return NULL;
}
return X509V3_EXT_get_nid(nid);
Expand Down

0 comments on commit 2fc2432

Please sign in to comment.