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
|
@ -645,7 +645,7 @@ int CmdSmartUpgrade(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;
|
||||
|
@ -676,7 +676,7 @@ int CmdSmartUpgrade(const char *Cmd) {
|
|||
fsize = ftell(f);
|
||||
fseek(f, 0, SEEK_SET);
|
||||
|
||||
if (fsize < 0) {
|
||||
if (fsize < 0) {
|
||||
PrintAndLogEx(FAILED, "Could not determine size of SHA-512 file");
|
||||
fclose(f);
|
||||
free(dump);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue