From 4bfae767a0741c0c22be95b6dd602a3b2ca3271f Mon Sep 17 00:00:00 2001 From: Wiebe Cazemier Date: Thu, 24 Mar 2022 21:19:59 +0100 Subject: [PATCH] Dummy property handling in handleConnect --- mqttpacket.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+), 0 deletions(-) diff --git a/mqttpacket.cpp b/mqttpacket.cpp index 9773be5..3659b90 100644 --- a/mqttpacket.cpp +++ b/mqttpacket.cpp @@ -368,11 +368,25 @@ void MqttPacket::handleConnect() request_problem_information = !!readByte(); break; case Mqtt5Properties::UserProperty: + { + const uint16_t len = readTwoBytesToUInt16(); + readBytes(len); + const uint16_t len2 = readTwoBytesToUInt16(); + readBytes(len2); break; + } case Mqtt5Properties::AuthenticationMethod: + { + const uint16_t len = readTwoBytesToUInt16(); + readBytes(len); break; + } case Mqtt5Properties::AuthenticationData: + { + const uint16_t len = readTwoBytesToUInt16(); + readBytes(len); break; + } default: throw ProtocolError("Invalid connect property."); } @@ -433,9 +447,19 @@ void MqttPacket::handleConnect() break; } case Mqtt5Properties::CorrelationData: + { + const uint16_t len = readTwoBytesToUInt16(); + readBytes(len); break; + } case Mqtt5Properties::UserProperty: + { + const uint16_t len = readTwoBytesToUInt16(); + readBytes(len); + const uint16_t len2 = readTwoBytesToUInt16(); + readBytes(len2); break; + } default: throw ProtocolError("Invalid will property in connect."); } -- libgit2 0.21.4