Commit bfadfc5
Fix CRSF buffer overflow and dashboard sizeof bug
CRSF buffer overflow (rx/crsf.c):
- fullFrameLength computed from untrusted frameLength field
- Malformed packet with large frameLength could overflow crsfFrame.bytes[]
- Added bounds check against CRSF_FRAME_SIZE_MAX before writing
Dashboard sizeof bug (io/dashboard.c):
- tickerCharacters was a pointer, so sizeof() returned pointer size (4/8)
- On 64-bit systems, TICKER_CHARACTER_COUNT was 8 instead of 4
- Could read past end of string when indexing tickerCharacters[]
- Changed to array declaration and sizeof()-1 for correct count
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 4720f62 commit bfadfc5
2 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
176 | | - | |
| 175 | + | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
163 | 168 | | |
164 | 169 | | |
165 | 170 | | |
| |||
0 commit comments