mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
coverity: separate crypto1 fcts ARM<>host into create/destroy and init/deinit
This commit is contained in:
parent
5fcb5f0ca5
commit
39fd6b1910
8 changed files with 49 additions and 43 deletions
|
@ -103,7 +103,7 @@ void MifareReadBlock(uint8_t blockNo, uint8_t keyType, uint8_t *datain) {
|
|||
break;
|
||||
}
|
||||
|
||||
crypto1_destroy(pcs);
|
||||
crypto1_deinit(pcs);
|
||||
|
||||
if (DBGLEVEL >= 2) DbpString("READ BLOCK FINISHED");
|
||||
|
||||
|
@ -264,7 +264,7 @@ void MifareReadSector(uint8_t arg0, uint8_t arg1, uint8_t *datain) {
|
|||
|
||||
if (DBGLEVEL >= 2) DbpString("READ SECTOR FINISHED");
|
||||
|
||||
crypto1_destroy(pcs);
|
||||
crypto1_deinit(pcs);
|
||||
|
||||
LED_B_ON();
|
||||
reply_old(CMD_ACK, isOK, 0, 0, dataoutbuf, 16 * NumBlocksPerSector(sectorNo));
|
||||
|
@ -430,7 +430,7 @@ void MifareWriteBlock(uint8_t arg0, uint8_t arg1, uint8_t *datain) {
|
|||
break;
|
||||
}
|
||||
|
||||
crypto1_destroy(pcs);
|
||||
crypto1_deinit(pcs);
|
||||
|
||||
if (DBGLEVEL >= 2) DbpString("WRITE BLOCK FINISHED");
|
||||
|
||||
|
@ -847,7 +847,7 @@ void MifareAcquireEncryptedNonces(uint32_t arg0, uint32_t arg1, uint32_t flags,
|
|||
}
|
||||
|
||||
LED_C_OFF();
|
||||
crypto1_destroy(pcs);
|
||||
crypto1_deinit(pcs);
|
||||
LED_B_ON();
|
||||
reply_old(CMD_ACK, isOK, cuid, num_nonces, buf, sizeof(buf));
|
||||
LED_B_OFF();
|
||||
|
@ -1061,7 +1061,7 @@ void MifareNested(uint8_t blockNo, uint8_t keyType, uint8_t targetBlockNo, uint8
|
|||
|
||||
LED_C_OFF();
|
||||
|
||||
crypto1_destroy(pcs);
|
||||
crypto1_deinit(pcs);
|
||||
|
||||
struct p {
|
||||
int16_t isOK;
|
||||
|
@ -1510,7 +1510,7 @@ void MifareChkKeys_fast(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *da
|
|||
OUT:
|
||||
LEDsoff();
|
||||
|
||||
crypto1_destroy(pcs);
|
||||
crypto1_deinit(pcs);
|
||||
|
||||
// All keys found, send to client, or last keychunk from client
|
||||
if (foundkeys == allkeys || lastchunk) {
|
||||
|
@ -1660,7 +1660,7 @@ void MifareChkKeys(uint8_t *datain) {
|
|||
LEDsoff();
|
||||
|
||||
set_tracing(false);
|
||||
crypto1_destroy(pcs);
|
||||
crypto1_deinit(pcs);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -1780,7 +1780,7 @@ int MifareECardLoad(uint8_t numSectors, uint8_t keyType) {
|
|||
if (DBGLEVEL >= DBG_INFO) DbpString("Emulator fill sectors finished");
|
||||
|
||||
out:
|
||||
crypto1_destroy(pcs);
|
||||
crypto1_deinit(pcs);
|
||||
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
|
||||
LEDsoff();
|
||||
set_tracing(false);
|
||||
|
@ -2110,7 +2110,7 @@ void MifareSetMod(uint8_t *datain) {
|
|||
break;
|
||||
}
|
||||
|
||||
crypto1_destroy(pcs);
|
||||
crypto1_deinit(pcs);
|
||||
|
||||
LED_B_ON();
|
||||
reply_ng(CMD_HF_MIFARE_SETMOD, isOK, NULL, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue