X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/28fdb04fd8d62e46c36f959b373d662f1a146448..28afbd2bee49027d042030bfce07db2db8c7508b:/client/mifarehost.c?ds=inline diff --git a/client/mifarehost.c b/client/mifarehost.c index 14674b16..9676e6f7 100644 --- a/client/mifarehost.c +++ b/client/mifarehost.c @@ -326,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;