From: Richard Levitte Date: Thu, 11 Apr 2002 22:14:10 +0000 (+0000) Subject: Check error code from a2d_ASN1_OBJECT(). X-Git-Tag: OpenSSL_0_9_7-beta1~109 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7b907f0bb50a2da39a3fc95a7aee4e72f396a5f3;p=oweals%2Fopenssl.git Check error code from a2d_ASN1_OBJECT(). --- diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index 8094c7df95..cf21ea3377 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -654,6 +654,8 @@ int OBJ_create(const char *oid, const char *sn, const char *ln) return(0); } i=a2d_ASN1_OBJECT(buf,i,oid,-1); + if (i == 0) + goto err; op=(ASN1_OBJECT *)ASN1_OBJECT_create(OBJ_new_nid(1),buf,i,sn,ln); if (op == NULL) goto err;