From 06e0273e1fca5296eb00ec0e62d658cf358d651d Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Tue, 21 Apr 2026 12:07:39 +1000 Subject: [PATCH] * CommonCLI: bounds check added to "unknown config:" replies --- src/helpers/CommonCLI.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/helpers/CommonCLI.cpp b/src/helpers/CommonCLI.cpp index d495aada..1f03d915 100644 --- a/src/helpers/CommonCLI.cpp +++ b/src/helpers/CommonCLI.cpp @@ -2,6 +2,7 @@ #include "CommonCLI.h" #include "TxtDataHelpers.h" #include "AdvertDataHelpers.h" +#include "TxtDataHelpers.h" #include #ifndef BRIDGE_MAX_BAUD @@ -726,7 +727,8 @@ void CommonCLI::handleSetCmd(uint32_t sender_timestamp, char* command, char* rep strcpy(reply, "Error: unsupported by this board"); }; } else { - sprintf(reply, "unknown config: %s", config); + strcpy(reply, "unknown config: "); + StrHelper::strncpy(&reply[16], config, 160-17); } }