fix: CWE-119

This commit is contained in:
2026-07-16 03:46:24 +03:00
parent 988a9ebbf1
commit e451b84450

View File

@@ -441,7 +441,7 @@ void handleServoMQTTCommand(const char* topic, const char* payload) {
int channel = -1;
char command[32] = {0};
if (sscanf(topic, "servo/control/%d/%s", &channel, command) != 2) {
if (sscanf(topic, "servo/control/%2d/%8s", &channel, command) != 2) {
Serial.printf("Invalid servo topic: %s\n", topic);
return;
}