Commit 3a7bec0
committed
fix(zwapi) Harden zwapi_connection_tx in zwapi_connection.c
Change is obvious, it prevent an overflow,
Also it has been observed than on edge case (0xFF)
the counter never ends because it loops on the range of i
that was defined as a char, let's use a larger range.
note that functions did not test all inputs params
specially when it is done in caller
(eg: in zwave_api_send_data reject frames above limit),
Also lenght is strored on 8bits which align to the frame max (0xFF/ 255).
Origin: #127
Bug-SiliconLabs: UIC-3666
Bug-SLVDBBP: 3169925
Signed-off-by: Philippe Coval <philippe.coval@silabs.com>1 parent 2e96957 commit 3a7bec0
1 file changed
Lines changed: 14 additions & 2 deletions
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
142 | 154 | | |
143 | 155 | | |
144 | 156 | | |
| |||
151 | 163 | | |
152 | 164 | | |
153 | 165 | | |
154 | | - | |
| 166 | + | |
155 | 167 | | |
156 | 168 | | |
157 | 169 | | |
| |||
0 commit comments