]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/mifarehost.c
USB CDC patch by jonor to enable working under kernel 2.6.27
[proxmark3-svn] / client / mifarehost.c
index 14674b1635d83de45902ebf3c62821440506fecf..9676e6f7a63e28fe2ae64a196947220d2ed00861 100644 (file)
@@ -326,7 +326,10 @@ int loadTraceCard(uint8_t *tuid) {
        blockNum = 0;\r
        while(!feof(f)){\r
                memset(buf, 0, sizeof(buf));\r
        blockNum = 0;\r
        while(!feof(f)){\r
                memset(buf, 0, sizeof(buf));\r
-               fgets(buf, sizeof(buf), f);\r
+               if (fgets(buf, sizeof(buf), f) == NULL) {\r
+      PrintAndLog("File reading error.");\r
+                       return 2;\r
+    }\r
 \r
                if (strlen(buf) < 32){\r
                        if (feof(f)) break;\r
 \r
                if (strlen(buf) < 32){\r
                        if (feof(f)) break;\r
Impressum, Datenschutz