Skip to content

Commit 2d06df3

Browse files
committed
Fix f-2356 v5 AUTH force zero
1 parent 37d2334 commit 2d06df3

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/mqtt_client.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2783,6 +2783,11 @@ int MqttClient_Auth(MqttClient *client, MqttAuth* auth)
27832783
}
27842784
#endif
27852785
MqttWriteStop(client, &auth->stat);
2786+
2787+
/* Clear tx_buf to remove any SASL auth data from memory.
2788+
* Use xfer (saved before MqttWriteStop zeroes client->write) */
2789+
CLIENT_FORCE_ZERO(client->tx_buf, xfer);
2790+
27862791
if (rc != xfer) {
27872792
MqttClient_CancelMessage(client, (MqttObject*)auth);
27882793
return rc;

0 commit comments

Comments
 (0)