From e061335055e46ff4e545e25c957746034b3948df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Tue, 21 Jul 2026 00:31:21 +0200 Subject: [PATCH 1/2] Reserve the [Exit] slot when splitting canned messages (#11095) splitConfiguredMessages capped the split loop at CANNED_MESSAGE_MODULE_MESSAGE_MAX_COUNT and then appended [Exit] unconditionally, so messages[] could be written one past its last index and messagesCount could exceed the array size. --- src/modules/CannedMessageModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/CannedMessageModule.cpp b/src/modules/CannedMessageModule.cpp index a10add057..dada48193 100644 --- a/src/modules/CannedMessageModule.cpp +++ b/src/modules/CannedMessageModule.cpp @@ -179,7 +179,7 @@ int CannedMessageModule::splitConfiguredMessages() while (i < upTo) { if (this->messageBuffer[i] == '|') { this->messageBuffer[i] = '\0'; // End previous message - if (tempCount >= CANNED_MESSAGE_MODULE_MESSAGE_MAX_COUNT) + if (tempCount >= CANNED_MESSAGE_MODULE_MESSAGE_MAX_COUNT - 1) break; tempMessages[tempCount++] = (this->messageBuffer + i + 1); } From 67e2012136262854bb5d0b1062a2c1327cd44971 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Jul 2026 17:42:47 -0500 Subject: [PATCH 2/2] fix: declare loop variable `sa` as const pointer in t5s3_epaper variant (#11111) * Initial plan * fix: declare sa as const pointer in t5s3_epaper variant.cpp --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- src/platform/extra_variants/t5s3_epaper/variant.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/extra_variants/t5s3_epaper/variant.cpp b/src/platform/extra_variants/t5s3_epaper/variant.cpp index 9a38ddf73..6c1dacb64 100644 --- a/src/platform/extra_variants/t5s3_epaper/variant.cpp +++ b/src/platform/extra_variants/t5s3_epaper/variant.cpp @@ -36,7 +36,7 @@ class TouchInkHUDBridge : public Observer // Check whether a system applet (e.g. menu) is currently handling input bool systemHandlingInput = false; - for (NicheGraphics::InkHUD::SystemApplet *sa : inkhud->systemApplets) { + for (const NicheGraphics::InkHUD::SystemApplet *sa : inkhud->systemApplets) { if (sa->handleInput) { systemHandlingInput = true; break;