mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-25 07:38:51 +00:00
Fix memory error in x509_get_attr_type_value
This commit is contained in:
parent
ba77bbf840
commit
686bfae244
1 changed files with 4 additions and 0 deletions
|
@ -287,6 +287,10 @@ static int x509_get_attr_type_value( unsigned char **p,
|
|||
ASN1_CONSTRUCTED | ASN1_SEQUENCE ) ) != 0 )
|
||||
return( POLARSSL_ERR_X509_CERT_INVALID_NAME + ret );
|
||||
|
||||
if( ( end - *p ) < 1 )
|
||||
return( POLARSSL_ERR_X509_CERT_INVALID_NAME +
|
||||
POLARSSL_ERR_ASN1_OUT_OF_DATA );
|
||||
|
||||
oid = &cur->oid;
|
||||
oid->tag = **p;
|
||||
|
||||
|
|
Loading…
Reference in a new issue