Skip to content

Commit

Permalink
fix em4x50_read function
Browse files Browse the repository at this point in the history
affected `lf search` and `lf em 4x50 rdbl -b <blk>`
  • Loading branch information
ANTodorov committed Oct 16, 2024
1 parent bed3dce commit 71b3540
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...

## [unreleased][unreleased]
- Fixed em4x50_read() - `lf search` and `lf em 4x50 rdbl -b <blk>` does not coredump reading EM4450 tag (@ANTodorov)
- Fixed flashing - client doesnt fail every other flash attempt (@iceman1001)
- Changed `pref show` - add option to dump as JSON (@doegox)
- Changed `mf_backdoor_dump.py`- use faster ecfill/eview (@doegox)
Expand Down
4 changes: 1 addition & 3 deletions client/src/cmdlfem4x50.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,10 +639,8 @@ int em4x50_read(em4x50_data_t *etd, em4x50_word_t *out) {
return PM3_ESOFT;
}

em4x50_read_data_response_t *o = (em4x50_read_data_response_t *)resp.data.asBytes;

em4x50_word_t words[EM4X50_NO_WORDS] = {0};
em4x50_prepare_result((uint8_t *)o->words, etd->addresses & 0xFF, (etd->addresses >> 8) & 0xFF, words);
em4x50_prepare_result(resp.data.asBytes, etd->addresses & 0xFF, (etd->addresses >> 8) & 0xFF, words);

if (out != NULL) {
memcpy(out, &words, sizeof(em4x50_word_t) * EM4X50_NO_WORDS);
Expand Down

0 comments on commit 71b3540

Please sign in to comment.