Commit 3be7e3c
committed
fix(svta): bound the svta ts option to uint32
CodeQL flagged the ts=<n> option as an incorrect integer conversion: strconv.Atoi
returns a platform-width int, so a value above 2^32-1 was silently truncated when
assigned to the uint32 EventStream@timescale (ts=4294967296 became 0, ts=4294967297
became 1). Use the existing parseUint32 helper, which parses with an explicit 32-bit
bound, and reject anything outside it.1 parent 0f356cd commit 3be7e3c
2 files changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
116 | 118 | | |
117 | | - | |
| 119 | + | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
| |||
0 commit comments