Commit 7b1279b
adversarial rx_parse tests; fix output-zeroing on empty payload
Add test_intrusive_rx.c with 16 golden adversarial tests for rx_parse,
covering all three protocol versions (v0.1, v1.0, v1.1), version
detection, tail-byte parsing, bit-field boundary checks, cross-version
ambiguity, and rejection paths.
Fix: move memset of output structs before the early-return size check
so that outputs are always zeroed regardless of payload size.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent b790e6f commit 7b1279b
File tree
3 files changed
+639
-2
lines changed- libcanard
- tests
- src
3 files changed
+639
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1083 | 1083 | | |
1084 | 1084 | | |
1085 | 1085 | | |
| 1086 | + | |
| 1087 | + | |
1086 | 1088 | | |
1087 | 1089 | | |
1088 | 1090 | | |
1089 | 1091 | | |
1090 | | - | |
1091 | | - | |
1092 | 1092 | | |
1093 | 1093 | | |
1094 | 1094 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| |||
0 commit comments