mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-30 04:14:19 +01:00
Zeroize tmp buf in mbedtls_md_file() md.c
This commit is contained in:
parent
bdbca7b383
commit
eb132b655c
@ -312,12 +312,11 @@ int mbedtls_md_file( const mbedtls_md_info_t *md_info, const char *path, unsigne
|
|||||||
md_info->update_func( ctx.md_ctx, buf, n );
|
md_info->update_func( ctx.md_ctx, buf, n );
|
||||||
|
|
||||||
if( ferror( f ) != 0 )
|
if( ferror( f ) != 0 )
|
||||||
{
|
|
||||||
ret = MBEDTLS_ERR_MD_FILE_IO_ERROR;
|
ret = MBEDTLS_ERR_MD_FILE_IO_ERROR;
|
||||||
goto cleanup;
|
else
|
||||||
}
|
md_info->finish_func( ctx.md_ctx, output );
|
||||||
|
|
||||||
md_info->finish_func( ctx.md_ctx, output );
|
mbedtls_zeroize( buf, sizeof( buf ) );
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
fclose( f );
|
fclose( f );
|
||||||
|
Loading…
Reference in New Issue
Block a user