Commit a9eebc6
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: SiliconLabsSoftware#127
Bug-SiliconLabs: UIC-3666
Bug-SLVDBBP: 3169925
Signed-off-by: Philippe Coval <[email protected]>1 parent 85e13a7 commit a9eebc6
File tree
1 file changed
+14
-2
lines changed- applications/zpc/components/zwave_api/src
1 file changed
+14
-2
lines changedLines 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