Fix memory error in x509_get_attr_type_value

This commit is contained in:
Manuel Pégourié-Gonnard 2013-08-15 13:40:10 +02:00 committed by Paul Bakker
parent ba77bbf840
commit 686bfae244

View file

@ -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;