1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

Merge remote-tracking branch 'upstream-restricted/pr/369' into development-restricted

This commit is contained in:
Gilles Peskine
2017-11-28 14:16:47 +01:00
11 changed files with 82 additions and 34 deletions

View File

@ -228,12 +228,13 @@ int mbedtls_platform_std_nv_seed_read( unsigned char *buf, size_t buf_len )
size_t n;
if( ( file = fopen( MBEDTLS_PLATFORM_STD_NV_SEED_FILE, "rb" ) ) == NULL )
return -1;
return( -1 );
if( ( n = fread( buf, 1, buf_len, file ) ) != buf_len )
{
fclose( file );
return -1;
mbedtls_zeroize( buf, buf_len );
return( -1 );
}
fclose( file );