From 6b1f99f5f17da4ae9783991928f8f7e611c678e3 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Wed, 8 Jun 2022 13:37:37 +0200 Subject: [PATCH] Use proper buffer size macro for allocation in psa_pake_ecjpake_setup() Signed-off-by: Neil Armstrong --- library/psa_crypto_pake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/psa_crypto_pake.c b/library/psa_crypto_pake.c index 7f730e58db..05d5854059 100644 --- a/library/psa_crypto_pake.c +++ b/library/psa_crypto_pake.c @@ -300,7 +300,7 @@ static psa_status_t psa_pake_ecjpake_setup( psa_pake_operation_t *operation ) if( ret != 0 ) return( mbedtls_to_psa_error( ret ) ); - operation->buffer = mbedtls_calloc( 1, 512 ); + operation->buffer = mbedtls_calloc( 1, PSA_PAKE_BUFFER_SIZE ); if( operation->buffer == NULL ) return( PSA_ERROR_INSUFFICIENT_MEMORY );