From d23e7f7305c1123a723051ad94a689a417949ec1 Mon Sep 17 00:00:00 2001 From: "Adrian A. Baumann" Date: Mon, 29 Jun 2026 00:33:41 +0200 Subject: [PATCH] Fix setValue length: pass buffer max not strlen so maxlength=63 in portal --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index bc2250c..12a37d1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -399,7 +399,7 @@ static void factoryReset(bool clearWifi) { Serial.printf("[BOOT] factory reset triggered (clearWifi=%d)!\n", clearWifi); strlcpy(hostname, HOSTNAME_DEFAULT, sizeof(hostname)); - hostnameParam.setValue(hostname, strlen(hostname)); + hostnameParam.setValue(hostname, sizeof(hostname) - 1); authCfg.enabled = false; authCfg.pass[0] = '\0'; @@ -455,7 +455,7 @@ void setup() { LittleFS.begin(true); loadConfig(); - hostnameParam.setValue(hostname, strlen(hostname)); + hostnameParam.setValue(hostname, sizeof(hostname) - 1); int resetCount = incrementResetCount();