X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/09181a54620f1f8feda0cada2daf7058cf482ad3..480e2f239421563263d07f6d11f2c929d7f14d1f:/client/cmdlfhitag.c diff --git a/client/cmdlfhitag.c b/client/cmdlfhitag.c index 36220643..81822eb6 100644 --- a/client/cmdlfhitag.c +++ b/client/cmdlfhitag.c @@ -71,7 +71,7 @@ int CmdLFHitagList(const char *Cmd) for (;;) { - if(i > traceLen) { break; } + if(i >= traceLen) { break; } bool isResponse; int timestamp = *((uint32_t *)(got+i)); @@ -173,7 +173,8 @@ int CmdLFHitagSim(const char *Cmd) { return 1; } tag_mem_supplied = true; - if (fread(c.d.asBytes,48,1,pf) == 0) { + size_t bytes_read = fread(c.d.asBytes, 48, 1, pf); + if ( bytes_read == 0) { PrintAndLog("Error: File reading error"); fclose(pf); return 1;