Two fixes for warnings when compiling on Ubuntu14.04.
FIX: a wrongly set parameter call to memset in CmdT55xxWipe . FIX: an ignored fread call in cmdhficlass.c,
This commit is contained in:
@@ -1021,7 +1021,11 @@ int CmdHFiClassCloneTag(const char *Cmd) {
|
|||||||
// else we have to create a share memory
|
// else we have to create a share memory
|
||||||
int i;
|
int i;
|
||||||
fseek(f,startblock*8,SEEK_SET);
|
fseek(f,startblock*8,SEEK_SET);
|
||||||
fread(tag_data,sizeof(iclass_block_t),endblock - startblock + 1,f);
|
if ( fread(tag_data,sizeof(iclass_block_t),endblock - startblock + 1,f) == 0){
|
||||||
|
PrintAndLog("File reading error.");
|
||||||
|
fclose(f);
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
uint8_t MAC[4]={0x00,0x00,0x00,0x00};
|
uint8_t MAC[4]={0x00,0x00,0x00,0x00};
|
||||||
uint8_t div_key[8]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
|
uint8_t div_key[8]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
|
||||||
|
|||||||
@@ -1317,7 +1317,7 @@ int CmdT55xxWipe(const char *Cmd) {
|
|||||||
if (!CmdT55xxWriteBlock(ptrData))
|
if (!CmdT55xxWriteBlock(ptrData))
|
||||||
PrintAndLog("Error writing blk %d", blk);
|
PrintAndLog("Error writing blk %d", blk);
|
||||||
|
|
||||||
memset(writeData, sizeof(writeData), 0x00);
|
memset(writeData,0x00, sizeof(writeData));
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user