Merge pull request #1428 from craftbyte/master

Fix DESfire DF search and assignment to AID
This commit is contained in:
Oleg Moiseenko 2021-08-06 23:34:33 +03:00 committed by GitHub
commit 86d8c5ff42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1581,7 +1581,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) {
@ -1590,7 +1590,7 @@ int DesfireFillAppList(DesfireContext *dctx, PICCInfoS *PICCInfo, AppListS appLi
}
}
}
// field on-off zone
DesfireFillPICCInfo(dctx, PICCInfo, deepmode);