mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 08:16:33 +01:00
Fix CRL parsing to avoid infinite loop
This patch modifies the function mbedtls_x509_crl_parse() to ensure that a CRL in PEM format with trailing characters after the footer does not result in the execution of an infinite loop.
This commit is contained in:
parent
cb587009d6
commit
939954c0b0
2 changed files with 10 additions and 1 deletions
|
|
@ -530,7 +530,7 @@ int mbedtls_x509_crl_parse( mbedtls_x509_crl *chain, const unsigned char *buf, s
|
|||
|
||||
mbedtls_pem_free( &pem );
|
||||
}
|
||||
else if( ret != MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT )
|
||||
else if( is_pem )
|
||||
{
|
||||
mbedtls_pem_free( &pem );
|
||||
return( ret );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue