mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-03 15:01:09 +00:00
Fix memory leak in x509_crl_parse()
The memory leak call was caused by missing calls to pem_free().
This commit is contained in:
parent
9fb2828aee
commit
03af0e0151
|
@ -37,6 +37,9 @@ Bugfix
|
|||
cause buffer bound checks to be bypassed. Found by Eyal Itkin.
|
||||
* Fixed potential arithmetic overflow in mbedtls_base64_decode() that could
|
||||
cause buffer bound checks to be bypassed. Found by Eyal Itkin.
|
||||
* Fix potential memory leak in x509_crl_parse(). The leak was caused by
|
||||
missing calls to pem_free() in cases when a
|
||||
POLARSSL_ERR_PEM_NO_HEADER_FOOTER_PRESENT error was encountered.
|
||||
|
||||
= mbed TLS 1.3.18 branch 2016-10-17
|
||||
|
||||
|
|
|
@ -520,16 +520,17 @@ int x509_crl_parse( x509_crl *chain, const unsigned char *buf, size_t buflen )
|
|||
if( ( ret = x509_crl_parse_der( chain,
|
||||
pem.buf, pem.buflen ) ) != 0 )
|
||||
{
|
||||
pem_free( &pem );
|
||||
return( ret );
|
||||
}
|
||||
|
||||
pem_free( &pem );
|
||||
}
|
||||
else if( is_pem )
|
||||
{
|
||||
pem_free( &pem );
|
||||
return( ret );
|
||||
}
|
||||
|
||||
pem_free( &pem );
|
||||
}
|
||||
while( is_pem && buflen > 0 );
|
||||
|
||||
|
|
Loading…
Reference in a new issue