Skip to content

Commit 479974b

Browse files
Potential fix for code scanning alert no. 161: Incorrect conversion between integer types
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent b8dc304 commit 479974b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sql/numbertype.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,6 +1082,9 @@ func mustInt64(v interface{}) int64 {
10821082
case uint32:
10831083
return int64(tv)
10841084
case uint64:
1085+
if tv > math.MaxInt64 {
1086+
panic(fmt.Sprintf("value %d exceeds int64 range", tv))
1087+
}
10851088
return int64(tv)
10861089
case bool:
10871090
if tv {

0 commit comments

Comments
 (0)