From fad3a3e4af0ab00e9ab601ea6b4bef4a4f30367d Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 25 Feb 2019 13:36:21 +0100 Subject: [PATCH] Fix build error with MSVC on 64-bit systems Explicitly cast size_t to uint32_t. --- library/psa_crypto_storage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/psa_crypto_storage.c b/library/psa_crypto_storage.c index 6c2e86573..840f418c3 100644 --- a/library/psa_crypto_storage.c +++ b/library/psa_crypto_storage.c @@ -101,7 +101,7 @@ static psa_status_t psa_crypto_storage_load( const psa_key_file_id_t key, if( status != PSA_SUCCESS ) return( status ); - status = psa_its_get( data_identifier, 0, data_size, data ); + status = psa_its_get( data_identifier, 0, (uint32_t) data_size, data ); return( status ); } @@ -146,7 +146,7 @@ static psa_status_t psa_crypto_storage_store( const psa_key_file_id_t key, if( psa_is_key_present_in_storage( key ) == 1 ) return( PSA_ERROR_ALREADY_EXISTS ); - status = psa_its_set( data_identifier, data_length, data, 0 ); + status = psa_its_set( data_identifier, (uint32_t) data_length, data, 0 ); if( status != PSA_SUCCESS ) { return( PSA_ERROR_STORAGE_FAILURE );