Repository navigation
minimal bugfix for DMX-serial out-of-bounds write (#5316 and #6020) - #6021
Conversation
only solves the out-of-bounds write, and avoids wrong channel reassignment
|
@coderabbitai full review |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Validate channel access wled00/src/dependencies/dmx/SparkFunDMX.cpp |
read returns 0 for channels below 1, above chanSize, or above dmxMaxChannel. write ignores channels below 0 or at least chanSize. Receive processing reads data only through dmxMaxChannel. |
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix
Possibly related issues
- wled/WLED issue 6020 — The issue describes DMX output crashes caused by channel allocation errors. The PR changes DMX channel bounds, which relates to the described out-of-bounds write.
Suggested reviewers: lplassman
Merge Risk: 
Minimal · up to 2dbbe
-
This change stops DMX channel reads and writes from going outside the valid range and lets a full 512-channel frame complete. I found no remaining merge-blocking risk.
Pre-merge checks: 
4
-
Full details: Title check
-
Explanation
The title names a minimal bugfix for a DMX-serial out-of-bounds write and cites issues
#5316and#6020. The change clamps out-of-range channel reads and writes in SparkFunDMX and bounds the receive loop in update, which addresses that out-of-bounds write. The title is specific and matches the main change. It does not name the files, and the issue references are cited by number only, which is acceptable.
-
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
What it does
only solves the DMX-serial out-of-bounds write and avoids the wrong channel reassignment. See #5316 and #6020 for more information.
AI assistance: no
Checklist
Summary by CodeRabbit