mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-04-09 22:03:41 +02:00
Add bounds check for OCSP nocheck parsing in X509
This commit is contained in:
@@ -370,6 +370,10 @@ static int x509_get_ocsp_nocheck( unsigned char **p,
|
||||
return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS +
|
||||
MBEDTLS_ERR_ASN1_LENGTH_MISMATCH );
|
||||
|
||||
if( *p != end )
|
||||
return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS +
|
||||
MBEDTLS_ERR_ASN1_LENGTH_MISMATCH );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user