Skip to content

Commit

Permalink
NFC: Fix Mifare DESFire reading
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL committed May 28, 2024
1 parent 1f1c05d commit 4931b5b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
- OFW: FuriHal: Add flash ops stats, workaround bug in SHCI_C2_SetSystemClock (by @skotopes)

### Fixed:
- NFC: Fix Mifare DESFire reading (by @Willy-JL)
- Storage: Fix process aliases in rename (by @Willy-JL)
- Desktop: Show "safe to unplug the USB cable" even when locked (by @Willy-JL)
- GUI: Some text and UI fixes (by @Willy-JL)
Expand All @@ -41,4 +42,4 @@
- OFW: FuriHalFlash: Fix obsolete-format delay (by @hedger)

### Removed:
- Nothing
- NFC: Removed `nfc_device_get_abbreviated_name()` API, only used by NFC app in Momentum and in NFC Maker
4 changes: 3 additions & 1 deletion lib/nfc/helpers/iso14443_4_layer.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ bool iso14443_4_layer_decode_block(

// TODO: Fix properly! this is a very big kostyl na velosipede
// (bit_buffer_copy_right are called to copy bigger buffer into smaller buffer causing crash on furi check) issue comes iso14443_4a_poller_send_block at line 109
if(bit_buffer_get_size_bytes(output_data) < bit_buffer_get_size_bytes(output_data) - 1)
// Mimicks furi_check()s in bit_buffer_copy_right(): buf=output_data other=block_data start_index=1
if(!(bit_buffer_get_size_bytes(block_data) > 1)) return ret;
if(!(bit_buffer_get_capacity_bytes(output_data) >= bit_buffer_get_size_bytes(block_data) - 1))
return ret;

do {
Expand Down

0 comments on commit 4931b5b

Please sign in to comment.