mirror of
https://github.com/flipperdevices/flipperzero-firmware.git
synced 2025-12-12 04:41:26 +04:00
NFC: Fix read crash with unexpectedly large MFC AUTH(0) response (#4265)
This was noticeable with Chameleon Ultra NTAG emulation Co-authored-by: hedger <hedger@users.noreply.github.com>
This commit is contained in:
@@ -42,7 +42,13 @@ static Iso14443_3aError iso14443_3a_poller_standard_frame_exchange(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(bit_buffer_get_capacity_bytes(rx_buffer) <
|
||||||
|
bit_buffer_get_size_bytes(instance->rx_buffer)) {
|
||||||
|
ret = Iso14443_3aErrorBufferOverflow;
|
||||||
|
break;
|
||||||
|
}
|
||||||
bit_buffer_copy(rx_buffer, instance->rx_buffer);
|
bit_buffer_copy(rx_buffer, instance->rx_buffer);
|
||||||
|
|
||||||
if(!iso14443_crc_check(Iso14443CrcTypeA, instance->rx_buffer)) {
|
if(!iso14443_crc_check(Iso14443CrcTypeA, instance->rx_buffer)) {
|
||||||
ret = Iso14443_3aErrorWrongCrc;
|
ret = Iso14443_3aErrorWrongCrc;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user