]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/desfire_crypto.c
ADD: adding a presco demod, given 0x10D as preamble, .. *work in progress*
[proxmark3-svn] / armsrc / desfire_crypto.c
index 469a8ec46761a807978d376066269840a586a150..acce980f3b768e3fe48f4f24ef4fd1e416ccd44e 100644 (file)
@@ -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;
Impressum, Datenschutz