From 46aec3acf5d139fe505179c920f9428b393cc7d2 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Wed, 18 Dec 2019 11:41:10 +0100 Subject: [PATCH] Fix AWS mqtt host length clipped to 32 --- tasmota/settings.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasmota/settings.ino b/tasmota/settings.ino index d5c59246f..881ec2e7c 100644 --- a/tasmota/settings.ino +++ b/tasmota/settings.ino @@ -590,8 +590,8 @@ char* SettingsText(uint32_t index) case SET_WEBPWD: position = Settings.web_password; break; #if defined(USE_MQTT_TLS) && defined(USE_MQTT_AWS_IOT) case SET_MQTT_HOST: - strlcpy(aws_mqtt_host, Settings.mqtt_user, strlen(Settings.mqtt_user)); - strlcpy(&aws_mqtt_host[strlen(Settings.mqtt_user)], Settings.mqtt_host, sizeof(Settings.mqtt_host)); + strncpy(aws_mqtt_host, Settings.mqtt_user, strlen(Settings.mqtt_user)); + strncpy(&aws_mqtt_host[strlen(Settings.mqtt_user)], Settings.mqtt_host, strlen(Settings.mqtt_host)); position = aws_mqtt_host; break; case SET_MQTT_USER: position = aws_mqtt_user; break; #else