mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 18:15:37 +01:00
Zeroize tmp buf on fail in load_file() dhm.c
This commit is contained in:
parent
8a2855ee3c
commit
f148312db4
@ -532,7 +532,10 @@ static int load_file( const char *path, unsigned char **buf, size_t *n )
|
|||||||
if( fread( *buf, 1, *n, f ) != *n )
|
if( fread( *buf, 1, *n, f ) != *n )
|
||||||
{
|
{
|
||||||
fclose( f );
|
fclose( f );
|
||||||
|
|
||||||
|
polarssl_zeroize( *buf, *n + 1 );
|
||||||
polarssl_free( *buf );
|
polarssl_free( *buf );
|
||||||
|
|
||||||
return( POLARSSL_ERR_DHM_FILE_IO_ERROR );
|
return( POLARSSL_ERR_DHM_FILE_IO_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user