check for invalid input on gateway
To prevent incomplete or chunked data being sent by the gateway
This commit is contained in:
@@ -179,6 +179,9 @@ void MyGateway::parseAndSend(char *commandBuffer) {
|
|||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
// Check for invalid input
|
||||||
|
if (i != 6)
|
||||||
|
return;
|
||||||
|
|
||||||
if (destination==GATEWAY_ADDRESS && command==C_INTERNAL) {
|
if (destination==GATEWAY_ADDRESS && command==C_INTERNAL) {
|
||||||
// Handle messages directed to gateway
|
// Handle messages directed to gateway
|
||||||
|
|||||||
Reference in New Issue
Block a user