Commit 4772288
committed
fix(dataexchange): prevent integer overflow in WriteFrame allocation
Use int64 arithmetic for size computation before allocating the
file frame payload buffer. This prevents a potential integer overflow
when len(name) + len(Payload) exceeds math.MaxInt on 32-bit platforms.
Fixes CodeQL high-severity alert: 'Size computation for allocation may overflow'1 parent 54f0edc commit 4772288
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
| |||
0 commit comments