diff --git a/library/lms.c b/library/lms.c index 26c48efa3b..f1230c7e70 100644 --- a/library/lms.c +++ b/library/lms.c @@ -562,7 +562,7 @@ int mbedtls_lms_generate_private_key( mbedtls_lms_private_t *ctx, ctx->params.I_key_identifier, MBEDTLS_LMOTS_I_KEY_ID_LEN ); - ctx->ots_private_keys = mbedtls_calloc( MERKLE_TREE_LEAF_NODE_AM(ctx->params.type), + ctx->ots_private_keys = mbedtls_calloc( ( size_t )MERKLE_TREE_LEAF_NODE_AM(ctx->params.type), sizeof( mbedtls_lmots_private_t ) ); if( ctx->ots_private_keys == NULL ) { @@ -570,7 +570,7 @@ int mbedtls_lms_generate_private_key( mbedtls_lms_private_t *ctx, goto exit; } - ctx->ots_public_keys = mbedtls_calloc( MERKLE_TREE_LEAF_NODE_AM(ctx->params.type), + ctx->ots_public_keys = mbedtls_calloc( ( size_t )MERKLE_TREE_LEAF_NODE_AM(ctx->params.type), sizeof( mbedtls_lmots_public_t ) ); if( ctx->ots_public_keys == NULL ) {