Check the return values where memory allocation failures may happen.
PR: 49
This commit is contained in:
@@ -228,7 +228,7 @@ int OBJ_add_object(ASN1_OBJECT *obj)
|
||||
if (added == NULL)
|
||||
if (!init_added()) return(0);
|
||||
if ((o=OBJ_dup(obj)) == NULL) goto err;
|
||||
ao[ADDED_NID]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ));
|
||||
if (!(ao[ADDED_NID]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)))) goto err;
|
||||
if ((o->length != 0) && (obj->data != NULL))
|
||||
ao[ADDED_DATA]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ));
|
||||
if (o->sn != NULL)
|
||||
|
Reference in New Issue
Block a user