1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-06-13 19:21:32 +03:00

Merge pull request #952 from gilles-peskine-arm/stdio_buffering-setbuf

Turn off stdio buffering with setbuf()
This commit is contained in:
Paul Elliott
2022-07-04 10:12:22 +01:00
committed by GitHub
18 changed files with 168 additions and 1 deletions

View File

@ -101,6 +101,10 @@ void nss_keylog_export( void *p_expkey,
goto exit;
}
/* Ensure no stdio buffering of secrets, as such buffers cannot be
* wiped. */
mbedtls_setbuf( f, NULL );
if( fwrite( nss_keylog_line, 1, len, f ) != len )
{
fclose( f );