Fix remaining length protection

This commit is contained in:
Nick O'Leary
2018-11-02 00:06:32 +00:00
parent af860133e8
commit 4daba0ae5c
2 changed files with 3 additions and 3 deletions

View File

@ -244,7 +244,7 @@ uint16_t PubSubClient::readPacket(uint8_t* lengthLength) {
uint8_t start = 0;
do {
if (len == 6) {
if (len == 5) {
// Invalid remaining length encoding - kill the connection
_state = MQTT_DISCONNECTED;
_client->stop();