fixed size error when creating dump files of mfclassic
This commit is contained in:
parent
e23f8a9f9c
commit
7b5a840935
@ -669,7 +669,7 @@ main(int argc, const char *argv[])
|
|||||||
magic2 = true;
|
magic2 = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("Guessing size: seems to be a %i-byte card\n", (uiBlocks + 1) * 16);
|
printf("Guessing size: seems to be a %i-byte card\n", (uiBlocks + 1) * sizeof(mifare_classic_block));
|
||||||
|
|
||||||
if (bUseKeyFile) {
|
if (bUseKeyFile) {
|
||||||
FILE *pfKeys = fopen(argv[4], "rb");
|
FILE *pfKeys = fopen(argv[4], "rb");
|
||||||
@ -686,7 +686,7 @@ main(int argc, const char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (atAction == ACTION_READ) {
|
if (atAction == ACTION_READ) {
|
||||||
memset(&mtDump, 0x00, sizeof(mtDump));
|
memset(&mtDump, 0x00, (uiBlocks + 1) * sizeof(mifare_classic_block));
|
||||||
} else {
|
} else {
|
||||||
FILE *pfDump = fopen(argv[3], "rb");
|
FILE *pfDump = fopen(argv[3], "rb");
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user