Repository navigation
Commit dea17b4
committed
in_forward: validate array size before accessing message mode fields
The forward protocol parser accesses root.via.array.ptr[2] when the
second element is a positive integer or EXT type (message mode), but
only checks that the array has at least 2 elements. A 2-element array
[tag, integer] passes the size check but causes an out-of-bounds heap
read when accessing index 2.
Add a size >= 3 check before the message mode branch.1 parent f6126eb commit dea17b4
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1488 | 1488 | | |
1489 | 1489 | | |
1490 | 1490 | | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
1491 | 1499 | | |
1492 | 1500 | | |
1493 | 1501 | | |
| |||
0 commit comments