mirror of https://github.com/meshcore-dev/MeshCore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Tree:
6755e50fa6
anon-contacts-fix
config-serializer
default-scope
dev
fast-st7735-display
flood.max.advert
gh-pages
main
revert-2915-main
t-impulse-ui
ui-color-refactor
companion-v1.0.0a
companion-v1.0.0b
companion-v1.0.0c
companion-v1.10.0
companion-v1.11.0
companion-v1.12.0
companion-v1.13.0
companion-v1.14.0
companion-v1.14.1
companion-v1.15.0
companion-v1.16.0
companion-v1.2.0
companion-v1.2.1
companion-v1.2.2
companion-v1.3.0
companion-v1.4.0
companion-v1.4.1
companion-v1.4.2
companion-v1.4.3
companion-v1.5.0
companion-v1.5.1
companion-v1.6.0
companion-v1.6.1
companion-v1.6.2
companion-v1.7.0
companion-v1.7.1
companion-v1.7.2
companion-v1.7.3
companion-v1.7.4
companion-v1.8.0
companion-v1.8.1
companion-v1.9.0
rep-v6
repeater-v1.0.0a
repeater-v1.0.0c
repeater-v1.0.0d
repeater-v1.10.0
repeater-v1.11.0
repeater-v1.12.0
repeater-v1.13.0
repeater-v1.14.0
repeater-v1.14.1
repeater-v1.15.0
repeater-v1.16.0
repeater-v1.2.0
repeater-v1.2.1
repeater-v1.2.2
repeater-v1.3.0
repeater-v1.4.0
repeater-v1.4.1
repeater-v1.4.2
repeater-v1.4.3
repeater-v1.5.0
repeater-v1.5.1
repeater-v1.6.0
repeater-v1.6.1
repeater-v1.6.2
repeater-v1.7.0
repeater-v1.7.1
repeater-v1.7.2
repeater-v1.7.3
repeater-v1.7.4
repeater-v1.8.0
repeater-v1.8.1
repeater-v1.9.0
repeater-v1.9.1
room-server-v1.0.0a
room-server-v1.0.0c
room-server-v1.10.0
room-server-v1.11.0
room-server-v1.12.0
room-server-v1.13.0
room-server-v1.14.0
room-server-v1.14.1
room-server-v1.15.0
room-server-v1.16.0
room-server-v1.2.0
room-server-v1.2.1
room-server-v1.2.2
room-server-v1.3.0
room-server-v1.4.0
room-server-v1.4.1
room-server-v1.4.2
room-server-v1.4.3
room-server-v1.5.0
room-server-v1.5.1
room-server-v1.6.0
room-server-v1.6.1
room-server-v1.6.2
room-server-v1.7.0
room-server-v1.7.1
room-server-v1.7.2
room-server-v1.7.3
room-server-v1.7.4
room-server-v1.8.0
room-server-v1.8.1
room-server-v1.9.0
room-v6
${ noResults }
The buffer-full branch writes the forced '\r' to command[sizeof-1], but the line-complete check below tests command[len-1] (== sizeof-2 when the buffer is full), so the line never completes: the read loop's condition (len < sizeof-1) stays false forever and the CLI stops reading serial input until reboot. Writing at [sizeof-1] also overwrites the string's NUL terminator, so the next strlen() reads past the buffer (UB). Write the '\r' at command[sizeof-2] instead — exactly the position the completion check tests. The overflowed input is then processed as an (unknown) command, the buffer resets, and the CLI keeps working. Reproduced on hardware (T1000-E repeater): ~53 arrow-key presses in an attached terminal (3-byte ESC[A escape sequences, 159 bytes with no CR) filled the buffer and the CLI never accepted a command again until reboot. The same copy-pasted pattern is fixed in simple_repeater, simple_sensor, simple_room_server and simple_secure_chat. |
2 weeks ago | |
|---|---|---|
| .. | ||
| main.cpp | fix(repeater/sensor/room_server/secure_chat cli): permanent lockup without CR | 3 days ago |