mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
FIX: Coverity scan, forgot one fread ...
CHG: Syntax suger
This commit is contained in:
parent
b112787d4f
commit
495d7f1326
2 changed files with 49 additions and 48 deletions
|
@ -513,9 +513,9 @@ int CmdHF14AMfRestore(const char *Cmd)
|
|||
for (sectorNo = 0; sectorNo < numSectors; sectorNo++) {
|
||||
for(blockNo = 0; blockNo < NumBlocksPerSector(sectorNo); blockNo++) {
|
||||
UsbCommand c = {CMD_MIFARE_WRITEBL, {FirstBlockOfSector(sectorNo) + blockNo, keyType, 0}};
|
||||
memcpy(c.d.asBytes, key, 6);
|
||||
|
||||
if (fread(bldata, 1, 16, fdump) == 0) {
|
||||
memcpy(c.d.asBytes, key, 6);
|
||||
bytes_read = fread(bldata, 1, 16, fdump);
|
||||
if ( bytes_read == 0) {
|
||||
PrintAndLog("File reading error (dumpdata.bin).");
|
||||
fclose(fdump);
|
||||
return 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue