mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 18:55:45 +00:00
Fix memory error in x509_get_attr_type_value
This commit is contained in:
parent
ba77bbf840
commit
686bfae244
|
@ -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