Correctly set buf size in entropy_update_nv_seed()

This commit is contained in:
Andres Amaya Garcia 2017-07-05 14:23:54 +01:00
parent 4e2c07c6e1
commit af0b31d76f

View File

@ -387,7 +387,7 @@ exit:
int mbedtls_entropy_update_nv_seed( mbedtls_entropy_context *ctx )
{
int ret = MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR;
unsigned char buf[ MBEDTLS_ENTROPY_MAX_SEED_SIZE ];
unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE];
/* Read new seed and write it to NV */
if( ( ret = mbedtls_entropy_func( ctx, buf, MBEDTLS_ENTROPY_BLOCK_SIZE ) ) != 0 )