From 99a82dce74c8a22ef57cfaea69ab1bbcaf798bed Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 5 Oct 2022 11:20:56 +0200 Subject: [PATCH] Readability improvement Signed-off-by: Gilles Peskine --- tests/src/helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/helpers.c b/tests/src/helpers.c index da2c047b4..557c13c33 100644 --- a/tests/src/helpers.c +++ b/tests/src/helpers.c @@ -354,7 +354,7 @@ int mbedtls_test_read_mpi_core( mbedtls_mpi_uint **pX, size_t *plimbs, if( *pX != NULL ) return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA ); - *plimbs = ( input->len + sizeof( **pX ) - 1 ) / sizeof( **pX ); + *plimbs = CHARS_TO_LIMBS( input->len ); if( *plimbs == 0 ) return( 0 ); *pX = mbedtls_calloc( *plimbs, sizeof( **pX ) );