Check number of bytes on wire vs length expected

This commit is contained in:
Eric Betts
2025-11-03 20:55:07 -08:00
parent 2605f09b98
commit 84894eabd2
+7 -2
View File
@@ -198,8 +198,13 @@ bool seader_recv_t1(Seader* seader, CCID_Message* message) {
uint8_t NAD = message->payload[0];
uint8_t rPCB = message->payload[1];
uint8_t LEN = message->payload[2];
uint8_t LRC = message->payload[3 + LEN];
FURI_LOG_D(TAG, "NAD: %02X, rPCB: %02X, LEN: %02X, LRC: %02X", NAD, rPCB, LEN, LRC);
//uint8_t LRC = message->payload[3 + LEN];
//FURI_LOG_D(TAG, "NAD: %02X, rPCB: %02X, LEN: %02X, LRC: %02X", NAD, rPCB, LEN, LRC);
if(message->dwLength < (uint32_t)(3 + LEN + 1)) {
// incomplete frame
return false;
}
if(rPCB == 0xE1) {
// S(IFS response)