From b91080ffc79d00ef746fa1de730293e35ca4b90a Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Wed, 15 Dec 2010 12:51:22 +0000 Subject: [PATCH] Fix mifare_desfire_free_mem(). --- libfreefare/mifare_desfire.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfreefare/mifare_desfire.c b/libfreefare/mifare_desfire.c index 0afda92..bab0c3e 100644 --- a/libfreefare/mifare_desfire.c +++ b/libfreefare/mifare_desfire.c @@ -830,7 +830,7 @@ mifare_desfire_free_mem (MifareTag tag, uint32_t *size) ssize_t sn = __res_n; b = mifare_cryto_postprocess_data (tag, res, &sn, MDCM_PLAIN | CMAC_COMMAND | CMAC_VERIFY); - *size = res[1] | (res[2] << 8) | (res[3] << 16); + *size = res[0] | (res[1] << 8) | (res[2] << 16); return 0; }