From c86106d610f0ba27c229e0b0752d4b573c510236 Mon Sep 17 00:00:00 2001 From: Thomas Ries Date: Wed, 27 Nov 2024 22:15:09 +0100 Subject: [PATCH] connect(): password was written to wrong buffer, resulting in corrupt MQTT connect packet --- src/PubSubClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PubSubClient.cpp b/src/PubSubClient.cpp index 5b85384..e2ebfeb 100755 --- a/src/PubSubClient.cpp +++ b/src/PubSubClient.cpp @@ -247,7 +247,7 @@ boolean PubSubClient::connect(const char *id, const char *user, const char *pass length = writeString(user,this->receive_buffer,length); if(pass != NULL) { CHECK_STRING_LENGTH(length,pass) - length = writeString(pass,this->send_buffer,length); + length = writeString(pass,this->receive_buffer,length); } }