From 91bae312ed9359daf65bebb1a2e2783c0b8a329a Mon Sep 17 00:00:00 2001
From: Paul Zander
Date: Mon, 22 Nov 2021 15:46:05 +0100
Subject: [PATCH] Process review comments
---
examples/bridge-app/esp32/main/main.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/bridge-app/esp32/main/main.cpp b/examples/bridge-app/esp32/main/main.cpp
index fb2f831223117a..81f195230085cd 100644
--- a/examples/bridge-app/esp32/main/main.cpp
+++ b/examples/bridge-app/esp32/main/main.cpp
@@ -323,8 +323,8 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask)
if (itemChangedMask & Device::kChanged_Name)
{
- uint8_t zclName[kNodeLabelSize];
- ToZclCharString(zclName, dev->GetName(), kNodeLabelSize - 1);
+ uint8_t zclName[kNodeLabelSize + 1];
+ ToZclCharString(zclName, dev->GetName(), kNodeLabelSize);
MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID,
ZCL_NODE_LABEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0, ZCL_CHAR_STRING_ATTRIBUTE_TYPE,
zclName);