mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-10-15 07:49:57 +00:00
Merge pull request #100 from ptr727/sensor-list-bounds
cli: reject a negative `sensor list` start index
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user