From 515889453b56344827942b734bf920decd987a8c Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 26 Jul 2025 06:23:41 -0500 Subject: [PATCH] Update src/modules/SerialModule.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/modules/SerialModule.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/SerialModule.cpp b/src/modules/SerialModule.cpp index fe180ddbd..f3091e5bf 100644 --- a/src/modules/SerialModule.cpp +++ b/src/modules/SerialModule.cpp @@ -85,8 +85,7 @@ bool SerialModule::isValidConfig(const meshtastic_ModuleConfig_SerialConfig &con meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed(); cn->level = meshtastic_LogRecord_Level_ERROR; cn->time = getValidTime(RTCQualityFromNet); - strncpy(cn->message, warning, sizeof(cn->message) - 1); - cn->message[sizeof(cn->message) - 1] = '\0'; // Ensure null termination + snprintf(cn->message, sizeof(cn->message), "%s", warning); service->sendClientNotification(cn); #endif return false;