diff options
| author | Dr. Stephen Henson <[email protected]> | 2015-06-08 14:23:00 +0200 |
|---|---|---|
| committer | Dr. Stephen Henson <[email protected]> | 2015-06-08 22:47:41 +0200 |
| commit | 17689e7dc6eb006990c205083c5b07a202f50f7e (patch) | |
| tree | 548bc68f8cd7b8c1d6fbb22c2ae334a5e6e87a3f | |
| parent | Clean Kerberos pre-master secret (diff) | |
| download | openssl-17689e7dc6eb006990c205083c5b07a202f50f7e.tar.gz openssl-17689e7dc6eb006990c205083c5b07a202f50f7e.zip | |
return correct NID for undefined object
Reviewed-by: Tim Hudson <[email protected]>
(cherry picked from commit 0fb9990480919163cc375a2b6c0df1d8d901a77b)
| -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 9654775a476..b7d1b8351b6 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -382,6 +382,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 */ |
