Repository navigation
Commit 400e1f6
fix(cli): reject a terminal size flag value int cannot hold
givenInt parsed --terminal-columns/--terminal-rows as int64 and
converted to int, so on a 32-bit platform 2147483648 became
-2147483648 and was taken as given (code scanning: incorrect
conversion between integer types). It now parses at int's size and
fails on such a value. The new case in TestGivenIntParsesLikeIntVar
fails before the fix under GOARCH=386; on 64-bit platforms nothing
changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 37f7fcd commit 400e1f6
2 files changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
| |||
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
99 | 109 | | |
100 | 110 | | |
101 | 111 | | |
| |||
0 commit comments