From c3b59a9dba8a43962bfe1b4475707900b8c70543 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Tue, 23 Apr 2024 14:54:56 +0300 Subject: [PATCH] add todo --- lib/nfc/helpers/iso14443_4_layer.c | 1 + lib/toolbox/bit_buffer.c | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/nfc/helpers/iso14443_4_layer.c b/lib/nfc/helpers/iso14443_4_layer.c index 87d820d64..d53aef64f 100644 --- a/lib/nfc/helpers/iso14443_4_layer.c +++ b/lib/nfc/helpers/iso14443_4_layer.c @@ -68,6 +68,7 @@ bool iso14443_4_layer_decode_block( do { if(!bit_buffer_starts_with_byte(block_data, instance->pcb_prev)) break; + // TODO: Fix crash bit_buffer_copy_right(output_data, block_data, 1); ret = true; } while(false); diff --git a/lib/toolbox/bit_buffer.c b/lib/toolbox/bit_buffer.c index 85a52e79d..d8f62ef4c 100644 --- a/lib/toolbox/bit_buffer.c +++ b/lib/toolbox/bit_buffer.c @@ -58,6 +58,7 @@ void bit_buffer_copy_right(BitBuffer* buf, const BitBuffer* other, size_t start_ furi_check(buf); furi_check(other); furi_check(bit_buffer_get_size_bytes(other) > start_index); + // TODO: Fix crash furi_check(buf->capacity_bytes >= bit_buffer_get_size_bytes(other) - start_index); memcpy(buf->data, other->data + start_index, bit_buffer_get_size_bytes(other) - start_index);