diff --git a/firmware/console/binary/tunerstudio_io.cpp b/firmware/console/binary/tunerstudio_io.cpp index df4129d579..add73a304d 100644 --- a/firmware/console/binary/tunerstudio_io.cpp +++ b/firmware/console/binary/tunerstudio_io.cpp @@ -37,6 +37,8 @@ void TsChannelBase::copyAndWriteSmallCrcPacket(uint8_t responseCode, const uint8 } void TsChannelBase::crcAndWriteBuffer(uint8_t responseCode, size_t size) { + efiAssertVoid(OBD_PCM_Processor_Fault, size <= BLOCKING_FACTOR + 7, "crcAndWriteBuffer tried to transmit too large a packet") + auto scratchBuffer = this->scratchBuffer; // Index 0/1 = packet size (big endian) *(uint16_t*)scratchBuffer = SWAP_UINT16(size + 1);