mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
fsize can't be zero
This commit is contained in:
parent
69ba2d6a5b
commit
0b455607a9
5 changed files with 9 additions and 9 deletions
|
@ -636,7 +636,7 @@ int CmdHFiClassELoad(const char *Cmd) {
|
|||
long fsize = ftell(f);
|
||||
fseek(f, 0, SEEK_SET);
|
||||
|
||||
if (fsize < 0) {
|
||||
if (fsize <= 0) {
|
||||
PrintAndLogDevice(WARNING, "error, when getting filesize");
|
||||
fclose(f);
|
||||
return 1;
|
||||
|
@ -729,7 +729,7 @@ int CmdHFiClassDecrypt(const char *Cmd) {
|
|||
long fsize = ftell(f);
|
||||
fseek(f, 0, SEEK_SET);
|
||||
|
||||
if (fsize < 0) {
|
||||
if (fsize <= 0) {
|
||||
PrintAndLogEx(WARNING, "error, when getting filesize");
|
||||
fclose(f);
|
||||
return 2;
|
||||
|
@ -1609,7 +1609,7 @@ int CmdHFiClassReadTagFile(const char *Cmd) {
|
|||
long fsize = ftell(f);
|
||||
fseek(f, 0, SEEK_SET);
|
||||
|
||||
if (fsize < 0) {
|
||||
if (fsize <= 0) {
|
||||
PrintAndLogEx(WARNING, "Error, when getting filesize");
|
||||
fclose(f);
|
||||
return 1;
|
||||
|
@ -1766,7 +1766,7 @@ static int loadKeys(char *filename) {
|
|||
long fsize = ftell(f);
|
||||
fseek(f, 0, SEEK_SET);
|
||||
|
||||
if (fsize < 0) {
|
||||
if (fsize <= 0) {
|
||||
PrintAndLogEx(WARNING, "Error, when getting filesize");
|
||||
fclose(f);
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue