BUG: set agc.reset.interval command parser does not accept full input range
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 67/100
Research direction
Start in src/helpers/CommonCLI.cpp at the agc_reset_interval parser linked in the issue, then trace how the parsed interval is stored and checked. Reproduce the rollover with inputs around 252 and 256, and confirm the parser accepts values through 1000 seconds without wrapping before conversion.
Written by the indexing model from the issue text.
Description
agc_reset_interval is a uint8, and stored divided by four. As such, it should accept a value up to 255*4=1000 seconds.
The CLI parser stores interval = atoi(string) / 4 at https://github.com/meshcore-dev/MeshCore/blob/0679dbeffc504d562d2f09eb072fdc223f8ffc2a/src/helpers/CommonCLI.cpp#L475. It appears the compiler sees the interval is a unit8 and invokes a version of atoi() that already returns a unit8. The stored value becomes (input mod 256) / 4, making 252 the largest input accepted. At 256, it rolls over to 0, and so on.
- Dominant language
- C
- Stars
- 3.9k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 25
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 63/100
meshcore-dev/MeshCore#3622 ·
Maintainers usually reply within 1 day
-
[Feature Request] Set Australia (Mid) Preset to automatically enable 2 byte default path hash sizeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
meshcore-dev/MeshCore#3571 · 5 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
meshcore-dev/MeshCore#3567 · 1 comment ·
Maintainers usually reply within 1 day
-
RTC_RX8130CE writes and reads the one-hot WEEK register as a numberPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
meshcore-dev/MeshCore#3549 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
meshcore-dev/MeshCore#3513 ·
Maintainers usually reply within 1 day
All issues in meshcore-dev/MeshCore
Similar issues
-
dspromote: /etc/exports uses -alldirs on non-mount-point directories, so mountd exports nothingOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
nextbsd/nextbsd-userland#434 ·
Maintainers usually reply within 1 day
-
[YSQL] Local-node initdb reads postgres.bki, but YB clusters bootstrap only from yb_postgres.bkiOpenarea/ysql kind/enhancement priority/low status/awaiting-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
yugabyte/yugabyte-db#35763 ·
Maintainers usually reply within 1 day
-
category:port-update
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 2 days
-
emerge failure MARK mark-unstable media-kit
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
macaroni-os/mark-issues#834 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
NVIDIA/open-gpu-kernel-modules#1479 · 2 comments ·
Maintainers usually reply within 1 day