fix: CWE-119
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user