From af0b31d76faa9f1a23bd46a2afc2cbf020b7361c Mon Sep 17 00:00:00 2001 From: Andres Amaya Garcia Date: Wed, 5 Jul 2017 14:23:54 +0100 Subject: [PATCH] Correctly set buf size in entropy_update_nv_seed() --- library/entropy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/entropy.c b/library/entropy.c index a500b53127..e6da98b10a 100644 --- a/library/entropy.c +++ b/library/entropy.c @@ -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 )