Commit 4a3307d
committed
AP_ADSB: avoid buffer overwrite in AP_ADSB_Sagetech_MXS
we were not bounds-checking the off-wire length, and then reading many bytes into a target buffer based on it.
Do the bounds check.
Also remove the writing of the checksum into the payload buffer - this was the notional 1-byte overwrite1 parent 4d25361 commit 4a3307d
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
282 | 286 | | |
283 | 287 | | |
284 | 288 | | |
| |||
293 | 297 | | |
294 | 298 | | |
295 | 299 | | |
296 | | - | |
297 | 300 | | |
298 | 301 | | |
299 | 302 | | |
| |||
0 commit comments