1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-02-16 22:19:14 +01:00

check M command against max DCC packet size

This commit is contained in:
Harald Barth 2022-08-05 15:15:42 +02:00
parent 6286f5fedf
commit 704fabd1a4

View File

@ -355,6 +355,7 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream)
// NOTE: this command was parsed in HEX instead of decimal
params--; // drop REG
if (params<1) break;
if (params > MAX_PACKET_SIZE) break;
{
byte packet[params];
for (int i=0;i<params;i++) {