fix wrong copying when skipping sector trailers

This commit is contained in:
iceman1001 2023-05-05 13:18:53 +02:00
commit ed555be180

View file

@ -1467,12 +1467,12 @@ int convert_mfc_2_arr(uint8_t *in, uint16_t ilen, uint8_t *out, uint16_t *olen)
if (mfIsSectorTrailer(blockno) == false) { if (mfIsSectorTrailer(blockno) == false) {
memcpy(out, in, MFBLOCK_SIZE); memcpy(out, in, MFBLOCK_SIZE);
out += MFBLOCK_SIZE;
*olen += MFBLOCK_SIZE;
} }
blockno++; blockno++;
out += MFBLOCK_SIZE;
in += MFBLOCK_SIZE; in += MFBLOCK_SIZE;
ilen -= MFBLOCK_SIZE; ilen -= MFBLOCK_SIZE;
*olen += MFBLOCK_SIZE;
} }
return PM3_SUCCESS; return PM3_SUCCESS;
} }