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:
iceman1001 2015-12-09 15:29:18 +01:00
parent bf32dd923f
commit 2b9006bd14
2 changed files with 6 additions and 2 deletions

View file

@ -1021,7 +1021,11 @@ int CmdHFiClassCloneTag(const char *Cmd) {
// else we have to create a share memory
int i;
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 div_key[8]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

View file

@ -1317,7 +1317,7 @@ int CmdT55xxWipe(const char *Cmd) {
if (!CmdT55xxWriteBlock(ptrData))
PrintAndLog("Error writing blk %d", blk);
memset(writeData, sizeof(writeData), 0x00);
memset(writeData,0x00, sizeof(writeData));
}
return 0;
}