Skip to content

Commit ca27274

Browse files
author
Marcelo Aquino
committed
check for invalid input on gateway
To prevent incomplete or chunked data being sent by the gateway
1 parent 7b99a2e commit ca27274

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libraries/MySensors/MyGateway.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ void MyGateway::parseAndSend(char *commandBuffer) {
179179
}
180180
i++;
181181
}
182+
// Check for invalid input
183+
if (i != 6)
184+
return;
182185

183186
if (destination==GATEWAY_ADDRESS && command==C_INTERNAL) {
184187
// Handle messages directed to gateway

0 commit comments

Comments
 (0)