mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-01 17:56:12 +00:00
fix(solo): six fixes from the 2026-07-05 UI audit
- locked device: a ringing alarm/timer was invisible — wakeForAlarm() now holds the lock wake window for the whole ring, the lock screen draws the alert overlay, and a key-dismissed ring falls back to a 5 s glance - status bar: A / live-share / trail / repeater icons no longer vanish when Bluetooth is off (moved outside the isSerialEnabled() gate) - alert overlay: long text wraps to up to 3 lines inside the box instead of overflowing the border (new UITask::renderAlertOverlay, shared with lock) - MyMesh: force NUL on contact.name copied from an app frame (unterminated name could overrun the AdvertPath strcpy) - clock tools: ring/timer deadline compares now wrap-safe (signed diff), matching the trail/loc-share timers - messages: channel context menu freezes its target channel at open; fav toggle no longer retargets the menu when the fav-only filter drops the row All three solo envs build green (WioTrackerL1 OLED/Eink, GAT562-30S). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -211,6 +211,10 @@ void MyMesh::updateContactFromFrame(ContactInfo &contact, uint32_t& last_mod, co
|
||||
memcpy(contact.out_path, &frame[i], MAX_PATH_SIZE);
|
||||
i += MAX_PATH_SIZE;
|
||||
memcpy(contact.name, &frame[i], 32);
|
||||
// The frame comes from the app and nothing guarantees a NUL inside the 32
|
||||
// bytes; an unterminated name would later overrun strcpy/strlen consumers
|
||||
// (e.g. the AdvertPath name cache).
|
||||
contact.name[sizeof(contact.name) - 1] = '\0';
|
||||
i += 32;
|
||||
memcpy(&contact.last_advert_timestamp, &frame[i], 4);
|
||||
i += 4;
|
||||
|
||||
Reference in New Issue
Block a user