projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05627d5
)
return correct NID for undefined object
author
Dr. Stephen Henson
<steve@openssl.org>
Mon, 8 Jun 2015 12:23:00 +0000
(13:23 +0100)
committer
Dr. Stephen Henson
<steve@openssl.org>
Mon, 8 Jun 2015 20:46:42 +0000
(21:46 +0100)
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit
0fb9990480919163cc375a2b6c0df1d8d901a77b
)
crypto/objects/obj_dat.c
patch
|
blob
|
history
diff --git
a/crypto/objects/obj_dat.c
b/crypto/objects/obj_dat.c
index 5ff1294d3c45f26063b7a47d6783c897dca76e3a..aca382a6e9f3c964572b98cddfb0c9c1c3f6e6fe 100644
(file)
--- a/
crypto/objects/obj_dat.c
+++ b/
crypto/objects/obj_dat.c
@@
-417,6
+417,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 */