]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Two fixes for warnings when compiling on Ubuntu14.04.
authoriceman1001 <iceman@iuse.se>
Wed, 9 Dec 2015 14:29:18 +0000 (15:29 +0100)
committericeman1001 <iceman@iuse.se>
Wed, 9 Dec 2015 14:29:18 +0000 (15:29 +0100)
FIX: a wrongly set parameter call to memset in CmdT55xxWipe .
FIX: an ignored fread call in  cmdhficlass.c,

client/cmdhficlass.c
client/cmdlft55xx.c

index f17f96ca7f6998008a6512de229d0a109481306d..7f0779b640a421c373b54bd39f32bcdddf799b67 100644 (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};
index b967936b46af49de2f5eb4123f3370f8796f0ca4..386ac608b178acabc3b9c596a3a572fc74470762 100644 (file)
@@ -1317,7 +1317,7 @@ int CmdT55xxWipe(const char *Cmd) {
                if (!CmdT55xxWriteBlock(ptrData)) \r
                        PrintAndLog("Error writing blk %d", blk);\r
                \r
-               memset(writeData, sizeof(writeData), 0x00);\r
+               memset(writeData,0x00, sizeof(writeData));\r
        }\r
        return 0;\r
 }\r
Impressum, Datenschutz