add additional checks + cleanup

Submitted by: David Hartman <david_hartman@symantec.com>
This commit is contained in:
Nils Larsch
2006-01-29 23:12:22 +00:00
parent 25a58453ff
commit 8c5a2bd6bb
18 changed files with 90 additions and 42 deletions

View File

@@ -82,7 +82,8 @@ ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o)
r->data=OPENSSL_malloc(o->length);
if (r->data == NULL)
goto err;
memcpy(r->data,o->data,o->length);
if (o->data != NULL)
memcpy(r->data,o->data,o->length);
r->length=o->length;
r->nid=o->nid;
r->ln=r->sn=NULL;