X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/cfcc826a9bf48f28541284aa13f16c5749486512..7504dc50d539f1f9b0b99064f5c7d38e373890fa:/armsrc/desfire_crypto.c?ds=sidebyside diff --git a/armsrc/desfire_crypto.c b/armsrc/desfire_crypto.c index 469a8ec4..acce980f 100644 --- a/armsrc/desfire_crypto.c +++ b/armsrc/desfire_crypto.c @@ -226,8 +226,8 @@ void* mifare_cryto_preprocess_data (desfiretag_t tag, void *data, size_t *nbytes cmac (key, DESFIRE (tag)->ivect, res, *nbytes, DESFIRE (tag)->cmac); if (append_mac) { - maced_data_length (key, *nbytes); - + size_t len = maced_data_length (key, *nbytes); + ++len; memcpy (res, data, *nbytes); memcpy (res + *nbytes, DESFIRE (tag)->cmac, CMAC_LENGTH); *nbytes += CMAC_LENGTH;