mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-03-21 10:57:39 +00:00
Zeroize return buf on failure in pkparse.c
This commit is contained in:
parent
beb42837ac
commit
ff13995812
|
@ -98,7 +98,10 @@ int pk_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 );
|
||||||
polarssl_free( *buf );
|
polarssl_free( *buf );
|
||||||
|
|
||||||
return( POLARSSL_ERR_PK_FILE_IO_ERROR );
|
return( POLARSSL_ERR_PK_FILE_IO_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue