]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhficlass.c
Two fixes for warnings when compiling on Ubuntu14.04.
[proxmark3-svn] / client / cmdhficlass.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};
Impressum, Datenschutz