diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-06-08 13:23:00 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-06-08 21:44:56 +0100 |
commit | 0fb9990480919163cc375a2b6c0df1d8d901a77b (patch) | |
tree | 3acc9d43c90d48b539c7a89042938703596180df /crypto | |
parent | 2974e3d4641b80c76197e653a016e7c010eaf3a2 (diff) |
return correct NID for undefined object
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/objects/obj_dat.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index 27d61b3a43..e8a6b139dd 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -397,6 +397,9 @@ int OBJ_obj2nid(const ASN1_OBJECT *a) if (a->nid != 0) return (a->nid); + if (a->length == 0) + return NID_undef; + if (added != NULL) { ad.type = ADDED_DATA; ad.obj = (ASN1_OBJECT *)a; /* XXX: ugly but harmless */ |