Cast LMS allocation sizes to size_t
To prevent implict casting errors on 64-bit platforms Signed-off-by: Raef Coles <raef.coles@arm.com>
This commit is contained in:
parent
1310ecb389
commit
40f184c83e
1 changed files with 2 additions and 2 deletions
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue