do_othername: check for NULL after allocating objtmp
Signed-off-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
f6983d0d76
commit
54298141d3
@ -579,6 +579,8 @@ static int do_othername(GENERAL_NAME *gen, char *value, X509V3_CTX *ctx)
|
||||
return 0;
|
||||
objlen = p - value;
|
||||
objtmp = OPENSSL_malloc(objlen + 1);
|
||||
if (objtmp == NULL)
|
||||
return 0;
|
||||
strncpy(objtmp, value, objlen);
|
||||
objtmp[objlen] = 0;
|
||||
gen->d.otherName->type_id = OBJ_txt2obj(objtmp, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user