From 2c069dfad3aba3d8267a27d84dd7e253584c8e13 Mon Sep 17 00:00:00 2001 From: Mohammad Azim Khan Date: Wed, 15 Aug 2018 13:55:37 +0100 Subject: [PATCH] Fix typo in test_suite_entropy.function --- tests/suites/test_suite_entropy.function | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/suites/test_suite_entropy.function b/tests/suites/test_suite_entropy.function index 26a0f5911..0b1cfe80d 100644 --- a/tests/suites/test_suite_entropy.function +++ b/tests/suites/test_suite_entropy.function @@ -311,7 +311,6 @@ void entropy_nv_seed( data_t * read_seed ) unsigned char entropy[MBEDTLS_ENTROPY_BLOCK_SIZE]; unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE]; unsigned char empty[MBEDTLS_ENTROPY_BLOCK_SIZE]; - unsigned char read_seed->x[MBEDTLS_ENTROPY_BLOCK_SIZE]; unsigned char check_seed[MBEDTLS_ENTROPY_BLOCK_SIZE]; unsigned char check_entropy[MBEDTLS_ENTROPY_BLOCK_SIZE]; @@ -323,7 +322,7 @@ void entropy_nv_seed( data_t * read_seed ) memset( check_entropy, 3, MBEDTLS_ENTROPY_BLOCK_SIZE ); // Set the initial NV seed to read - memcpy( buffer_seed, read_seed->x, MBEDTLS_ENTROPY_BLOCK_SIZE ); + memcpy( buffer_seed, read_seed->x, read_seed->len ); // Make sure we read/write NV seed from our buffers mbedtls_platform_set_nv_seed( buffer_nv_seed_read, buffer_nv_seed_write ); @@ -348,7 +347,7 @@ void entropy_nv_seed( data_t * read_seed ) // First run for updating write_seed header[0] = 0; mbedtls_sha512_update( &accumulator, header, 2 ); - mbedtls_sha512_update( &accumulator, read_seed->x, MBEDTLS_ENTROPY_BLOCK_SIZE ); + mbedtls_sha512_update( &accumulator, read_seed->x, read_seed->len ); mbedtls_sha512_finish( &accumulator, buf ); memset( &accumulator, 0, sizeof( mbedtls_sha512_context ) );