diff --git a/client/mifare/mifarehost.c b/client/mifare/mifarehost.c index a9fbaac77..2f49b578e 100644 --- a/client/mifare/mifarehost.c +++ b/client/mifare/mifarehost.c @@ -407,9 +407,9 @@ static int nested_fixed_nonce(StateList_t statelist, uint32_t fixed_nt, uint32_t } // test each {ar} response - uint32_t key_index; + size_t key_index; - int isOK = mfCheckKeysFixedNonce(statelist.blockNo, statelist.keyType, authentication_timeout, true, num_ar_par, ar_par, &key_index); + int isOK = mfCheckKeysFixedNonce(statelist.blockNo, statelist.keyType, authentication_timeout, true, num_ar_par, ar_par, (uint32_t*)&key_index); if (isOK == 0) { // success, key found // key_index contains the index into the cypher state list diff --git a/common/mbedtls/cmac.c b/common/mbedtls/cmac.c index db4a71d72..d8738c508 100644 --- a/common/mbedtls/cmac.c +++ b/common/mbedtls/cmac.c @@ -427,7 +427,7 @@ int mbedtls_cipher_cmac( const mbedtls_cipher_info_t *cipher_info, */ int mbedtls_aes_cmac_prf_128( const unsigned char *key, size_t key_length, const unsigned char *input, size_t in_len, - unsigned char *output ) + unsigned char output[16] ) { int ret; const mbedtls_cipher_info_t *cipher_info;