Merge pull request #100 from ptr727/sensor-list-bounds

cli: reject a negative `sensor list` start index
This commit is contained in:
liquidraver
2026-10-05 21:16:43 +02:00
committed by GitHub
+1 -1
View File
@@ -589,7 +589,7 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
if (strlen(command) > 11) {
start = _atoi(command + 12);
}
if (start >= end) {
if (start < 0 || start >= end) {
strcpy(reply, "no custom var");
} else {
snprintf(dp, CLI_REPLY_SIZE - (dp - reply), "%d vars\n", end);