CMD_SET_DEFAULT_FLOOD_SCOPE leaves an older, longer name's tail after the new name
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c
- Domain
- embedded-iot
Research direction
Open examples/companion_radio/MyMesh.cpp and read the CMD_SET_DEFAULT_FLOOD_SCOPE handler around line 1993, then compare it with the clear branch around line 2001. Clear the name buffer before copying the shorter name, and check that CMD_GET_DEFAULT_FLOOD_SCOPE around line 2009 no longer returns the previous name’s trailing bytes.
Written by the indexing model from the issue text.
Description
examples/companion_radio/MyMesh.cpp:1993 (companion-v1.18.0, unchanged on main at 75b04ef0, 2026-11-21) copies the new name with strcpy(_prefs.default_scope_name, …). When the new name is shorter than the saved one, the bytes after its NUL keep the old name's tail. CMD_GET_DEFAULT_FLOOD_SCOPE then sends all 31 bytes (MyMesh.cpp:2009), tail included, and it is also saved with the prefs. The radio itself is unaffected, since it reads the name up to the NUL and goes by the key, but a client that doesn't stop at the first NUL shows a joined name: #au set over #au-vic-gipps reads back as #au\0vic-gipps.
Fix: memset(_prefs.default_scope_name, 0, sizeof(_prefs.default_scope_name)); before the strcpy, as the clear branch already does (MyMesh.cpp:2001).
- Dominant language
- C
- Stars
- 3.9k
- Forks
- 1.5k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 55
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from meshcore-dev/MeshCore
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
meshcore-dev/MeshCore#3826 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
meshcore-dev/MeshCore#3825 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
meshcore-dev/MeshCore#3781 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
meshcore-dev/MeshCore#3760 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
meshcore-dev/MeshCore#3698 ·
Maintainers usually reply within 1 day
All issues in meshcore-dev/MeshCore
Similar issues
-
area:gates kind:gate-defect
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
InauguralSystems/EigenScript#2476 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
flipperdevices/flipperzero-firmware#4520 ·
Maintainers usually reply within 1 day
-
area/build-framework kind/enhancement priority/low
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
yugabyte/yugabyte-db#38826 ·
Maintainers usually reply within 1 day
-
bug grammar sev-3
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
BUG/MEDIUM: regex: worker SIGSEGV when a regex is applied to an empty body on libc-regex buildsOpenstatus: needs-triage type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100