From c71f93687d075778ee9fe6b7e64f97e714aed116 Mon Sep 17 00:00:00 2001 From: Anze Jensterle Date: Thu, 5 Aug 2021 18:45:50 +0200 Subject: [PATCH] Fix DESfire DF search and assignment to AID --- client/src/mifare/desfirecore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/mifare/desfirecore.c b/client/src/mifare/desfirecore.c index ee34f4cfe..95d4a2228 100644 --- a/client/src/mifare/desfirecore.c +++ b/client/src/mifare/desfirecore.c @@ -1520,7 +1520,7 @@ int DesfireFillAppList(DesfireContext *dctx, PICCInfoS *PICCInfo, AppListS appLi res = DesfireGetDFList(dctx, buf, &buflen); if (res != PM3_SUCCESS) { PrintAndLogEx(WARNING, "Desfire GetDFList command " _RED_("error") ". Result: %d", res); - } else if (buflen > 1) { + } else if (buflen > 0) { for (int i = 0; i < buflen; i++) { int indx = AppListSearchAID(DesfireAIDByteToUint(&buf[i * 24 + 1]), appList, PICCInfo->appCount); if (indx >= 0) { @@ -1529,7 +1529,7 @@ int DesfireFillAppList(DesfireContext *dctx, PICCInfoS *PICCInfo, AppListS appLi } } } - + // field on-off zone DesfireFillPICCInfo(dctx, PICCInfo, deepmode);