nfc-mfclassic: verify return of nfc_initiator_select_passive_target()
Problem reported by Coverity: CID 1090323 (#1 of 1): Unchecked return value (CHECKED_RETURN) unchecked_value: No check of the return value of "nfc_initiator_select_passive_target(pnd, nmMifare, nt.nti.nai.abtUid, nt.nti.nai.szUidLen, NULL)".
This commit is contained in:
parent
a4f466df06
commit
61884967ea
1 changed files with 4 additions and 1 deletions
|
@ -215,7 +215,10 @@ authenticate(uint32_t uiBlock)
|
|||
memcpy(mtKeys.amb[uiBlock].mbt.abtKeyB, &mp.mpa.abtKey, 6);
|
||||
return true;
|
||||
}
|
||||
nfc_initiator_select_passive_target(pnd, nmMifare, nt.nti.nai.abtUid, nt.nti.nai.szUidLen, NULL);
|
||||
if (nfc_initiator_select_passive_target(pnd, nmMifare, nt.nti.nai.abtUid, nt.nti.nai.szUidLen, NULL) <= 0) {
|
||||
ERR("tag was removed");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue