From 3fb2e82a8e4aee5c83cae45af9678c44d9d553c9 Mon Sep 17 00:00:00 2001 From: Alexey Zholtikov Date: Sun, 9 Jun 2024 11:19:18 +0300 Subject: [PATCH] Fixed an error with array out of bounds --- main/zh_gateway.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/zh_gateway.c b/main/zh_gateway.c index b7e6ab1..9baa802 100755 --- a/main/zh_gateway.c +++ b/main/zh_gateway.c @@ -1039,7 +1039,7 @@ void zh_espnow_switch_send_mqtt_json_config_message(const zh_espnow_data_t *devi memset(qos, 0, 4); sprintf(qos, "%d", device_data->payload_data.config_message.switch_config_message.qos); zh_json_t json = {0}; - char buffer[512] = {0}; + char buffer[1024] = {0}; zh_json_init(&json); zh_json_add(&json, "platform", "mqtt"); zh_json_add(&json, "name", name);