mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-12 19:23:54 +08:00
Merge pull request #1176 from aveao/emrtd
emrtd: Fix EF_DG2 image dumping
This commit is contained in:
commit
bd285908ab
1 changed files with 2 additions and 2 deletions
|
@ -713,8 +713,8 @@ static int emrtd_dump_ef_dg2(uint8_t *file_contents, size_t file_length, const c
|
||||||
// Note: Doing file_length - 6 to account for the longest data we're checking.
|
// Note: Doing file_length - 6 to account for the longest data we're checking.
|
||||||
// Checks first byte before the rest to reduce overhead
|
// Checks first byte before the rest to reduce overhead
|
||||||
for (offset = 0; offset < file_length - 6; offset++) {
|
for (offset = 0; offset < file_length - 6; offset++) {
|
||||||
if ((file_contents[offset] == 0xFF && memcmp(jpeg_header, file_contents + offset, 4) != 0) ||
|
if ((file_contents[offset] == 0xFF && memcmp(jpeg_header, file_contents + offset, 4) == 0) ||
|
||||||
(file_contents[offset] == 0x00 && memcmp(jpeg2k_header, file_contents + offset, 6) != 0)) {
|
(file_contents[offset] == 0x00 && memcmp(jpeg2k_header, file_contents + offset, 6) == 0)) {
|
||||||
datalen = file_length - offset;
|
datalen = file_length - offset;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue