The new ASN1 code automatically allocates
structures for fields that are not OPTIONAL. However in the AUTHORITY_INFO_ACCESS case the 'location' field was set to NULL in the old code. So in 0.9.7+ we should free up the field before overwriting it in v2i_AUTHORITY_INFO_ACCESS.
This commit is contained in:
parent
e1f7ea25d2
commit
04cc76660a
@ -158,6 +158,7 @@ static AUTHORITY_INFO_ACCESS *v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *metho
|
|||||||
objlen = ptmp - cnf->name;
|
objlen = ptmp - cnf->name;
|
||||||
ctmp.name = ptmp + 1;
|
ctmp.name = ptmp + 1;
|
||||||
ctmp.value = cnf->value;
|
ctmp.value = cnf->value;
|
||||||
|
GENERAL_NAME_free(acc->location);
|
||||||
if(!(acc->location = v2i_GENERAL_NAME(method, ctx, &ctmp)))
|
if(!(acc->location = v2i_GENERAL_NAME(method, ctx, &ctmp)))
|
||||||
goto err;
|
goto err;
|
||||||
if(!(objtmp = OPENSSL_malloc(objlen + 1))) {
|
if(!(objtmp = OPENSSL_malloc(objlen + 1))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user