Fix for making ndefread CRC override work

The return value from MADCheck, which happens before MADDecode, needs to be ignored also
This commit is contained in:
Darell Tan
2025-11-04 00:53:35 +08:00
parent f7ec92b7c2
commit c5028d9384
2 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -7129,7 +7129,10 @@ int CmdHFMFNDEFRead(const char *Cmd) {
int res = MADCheck(sector0, sector10, verbose, &haveMAD2);
if (res != PM3_SUCCESS) {
PrintAndLogEx(ERR, "MAD error %d", res);
return res;
if (override)
PrintAndLogEx(INFO, "overriding CRC check");
else
return res;
}
uint16_t mad[7 + 8 + 8 + 8 + 8] = {0};
+4 -1
View File
@@ -2203,7 +2203,10 @@ int CmdHFMFPNDEFRead(const char *Cmd) {
int res = MADCheck(sector0, NULL, verbose, &haveMAD2);
if (res != PM3_SUCCESS) {
PrintAndLogEx(ERR, "MAD error %d", res);
return res;
if (override)
PrintAndLogEx(INFO, "overriding CRC check");
else
return res;
}
if (haveMAD2) {