X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/7dd1908b241b3a9e5764112bd822472f80287073..babfcaa0f3e4f3d83fd7ac9707a37db12431ec80:/client/mifarehost.c diff --git a/client/mifarehost.c b/client/mifarehost.c index 825e06d8..9676e6f7 100644 --- a/client/mifarehost.c +++ b/client/mifarehost.c @@ -15,7 +15,6 @@ #include "proxmark3.h" // MIFARE - int compar_int(const void * a, const void * b) { return (*(uint64_t*)b - *(uint64_t*)a); } @@ -327,7 +326,10 @@ int loadTraceCard(uint8_t *tuid) { blockNum = 0; while(!feof(f)){ memset(buf, 0, sizeof(buf)); - fgets(buf, sizeof(buf), f); + if (fgets(buf, sizeof(buf), f) == NULL) { + PrintAndLog("File reading error."); + return 2; + } if (strlen(buf) < 32){ if (feof(f)) break;