From 9f678ede69b9e2945a528906c182912ce24b8fb9 Mon Sep 17 00:00:00 2001 From: didier Date: Thu, 16 Oct 2025 12:53:15 +0200 Subject: [PATCH 1/2] fix type warning --- common/mbedtls/cmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; From 5d2586ebfbfbaffccc852491cc0049e1d5968eeb Mon Sep 17 00:00:00 2001 From: didier Date: Thu, 16 Oct 2025 13:09:14 +0200 Subject: [PATCH 2/2] fix size warning --- client/mifare/mifarehost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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