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
commit 41aa808a56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 );