Skip to content

Commit

Permalink
Fixed a bug with the merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jlitewski committed May 27, 2024
1 parent 5393106 commit 20d42a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions armsrc/desfire_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ void *mifare_cryto_preprocess_data(desfiretag_t tag, void *data, size_t *nbytes,

void *mifare_cryto_postprocess_data(desfiretag_t tag, void *data, size_t *nbytes, int communication_settings) {
void *res = data;
void *edata = nullptr;
uint8_t *edata = nullptr;
uint8_t first_cmac_byte = 0x00;

desfirekey_t key = DESFIRE(tag)->session_key;
Expand Down Expand Up @@ -590,7 +590,7 @@ void *mifare_cryto_postprocess_data(desfiretag_t tag, void *data, size_t *nbytes
}

size_t edl = enciphered_data_length(tag, *nbytes - 1, communication_settings);
edata = palloc(1, edl);
edata = (uint8_t*)palloc(1, edl);

palloc_copy(edata, data, *nbytes - 1);
palloc_set((uint8_t *)edata + *nbytes - 1, 0, edl - *nbytes + 1);
Expand Down

0 comments on commit 20d42a7

Please sign in to comment.