Adafruit_MQTT_Library
Adafruit_MQTT_Library copied to clipboard
Buffer overflow on connect if len(password)+len(user) > MAXBUFFERSIZE (150)
Adafruit_MQTT declares uint8_t Adafruit_MQTT::buffer[MAXBUFFERSIZE] Adafruit_MQTT::connect calls connectPacket(buffer) without passing in size of buffer. connectPacket fills in buffer, if password or user name are sufficiently large it will overflow without any checks.
Had similar problem. I changed Adafruit_MQTT.h to change MAXBUFFERSIZE from 150 to 1000. That resolved problem. You may wish to use a smaller size.