mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 02:34:48 +08:00
coverity 226404 - fix ignoring number..
This commit is contained in:
parent
201817d7e4
commit
2b50ccbef8
1 changed files with 7 additions and 8 deletions
|
@ -137,16 +137,15 @@ bool nfc3d_amiibo_load_keys(nfc3d_amiibo_keys *amiiboKeys, const char *path) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fread(amiiboKeys, sizeof(*amiiboKeys), 1, f)) {
|
size_t len = fread(amiiboKeys, sizeof(*amiiboKeys), 1, f);
|
||||||
fclose(f);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
if (
|
if (len != sizeof(*amiiboKeys)) {
|
||||||
(amiiboKeys->data.magicBytesSize > 16) ||
|
return false;
|
||||||
(amiiboKeys->tag.magicBytesSize > 16)
|
}
|
||||||
) {
|
|
||||||
|
if ((amiiboKeys->data.magicBytesSize > 16) ||
|
||||||
|
(amiiboKeys->tag.magicBytesSize > 16)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue