We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9eb37ef + 417d342 commit b7838a3Copy full SHA for b7838a3
Adafruit_MQTT.cpp
@@ -463,6 +463,9 @@ Adafruit_MQTT_Subscribe *Adafruit_MQTT::readSubscription(int16_t timeout) {
463
DEBUG_PRINT("Packet len: "); DEBUG_PRINTLN(len);
464
DEBUG_PRINTBUFFER(buffer, len);
465
466
+ if (len<3) return NULL;
467
+ if ((buffer[0] & 0xF0) != (MQTT_CTRL_PUBLISH) << 4) return NULL;
468
+
469
// Parse out length of packet.
470
topiclen = buffer[3];
471
DEBUG_PRINT(F("Looking for subscription len ")); DEBUG_PRINTLN(topiclen);
0 commit comments