Check error code from a2d_ASN1_OBJECT().
authorRichard Levitte <levitte@openssl.org>
Thu, 11 Apr 2002 22:13:58 +0000 (22:13 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 11 Apr 2002 22:13:58 +0000 (22:13 +0000)
crypto/objects/obj_dat.c

index 8094c7df95f4da09982e89bbf72b6c5dc12cf9be..cf21ea337772f87e9dcb52f232442fa519350df9 100644 (file)
@@ -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;