mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-04-30 03:26:34 +00:00
Zeroize buf if mbedtls_base64_decode() fails
This commit is contained in:
parent
1bfa46a456
commit
2d829fb4b3
|
@ -333,6 +333,7 @@ int pem_read_buffer( pem_context *ctx, const char *header, const char *footer,
|
||||||
|
|
||||||
if( ( ret = base64_decode( buf, &len, s1, s2 - s1 ) ) != 0 )
|
if( ( ret = base64_decode( buf, &len, s1, s2 - s1 ) ) != 0 )
|
||||||
{
|
{
|
||||||
|
polarssl_zeroize( buf, len );
|
||||||
polarssl_free( buf );
|
polarssl_free( buf );
|
||||||
return( POLARSSL_ERR_PEM_INVALID_DATA + ret );
|
return( POLARSSL_ERR_PEM_INVALID_DATA + ret );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue