diff options
author | Drokov Pavel <drokov@rutoken.ru> | 2024-01-11 18:51:15 -0500 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-01-15 10:43:44 +0100 |
commit | 6b92a966e0de3ad848fcf11fbcab7ee8cae24ba1 (patch) | |
tree | 41ee10021e7b1d9c503e5c40ff729c93f3493063 /crypto/objects/obj_dat.c | |
parent | 4e5bf933131863e0459d7b39931d464fef77b078 (diff) |
Check ASN1_OBJECT_new result
CLA: trivial
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23270)
Diffstat (limited to 'crypto/objects/obj_dat.c')
-rw-r--r-- | crypto/objects/obj_dat.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index b0e1032ec2..ebde562477 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -790,6 +790,10 @@ int OBJ_create(const char *oid, const char *sn, const char *ln) } else { /* Create a no-OID ASN1_OBJECT */ tmpoid = ASN1_OBJECT_new(); + if (tmpoid == NULL) { + ERR_raise(ERR_LIB_OBJ, ERR_R_ASN1_LIB); + return 0; + } } if (!ossl_obj_write_lock(1)) { |