mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
Added error checking for OBJ_create
fixes segmentation fault in case of not enough memory for object creation CLA: trivial Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3157)
This commit is contained in:
parent
a105d5603b
commit
487a73def6
@ -691,6 +691,8 @@ int OBJ_create(const char *oid, const char *sn, const char *ln)
|
||||
|
||||
/* Convert numerical OID string to an ASN1_OBJECT structure */
|
||||
tmpoid = OBJ_txt2obj(oid, 1);
|
||||
if (tmpoid == NULL)
|
||||
return 0;
|
||||
|
||||
/* If NID is not NID_undef then object already exists */
|
||||
if (OBJ_obj2nid(tmpoid) != NID_undef) {
|
||||
|
Loading…
Reference in New Issue
Block a user