[#6132] replaced strconv.Itoa with strconv.FormatInt where it could overflow

This commit is contained in:
Gani Georgiev
2024-12-17 21:41:55 +02:00
parent 9b4200a65c
commit ef0170cf0b
39 changed files with 61 additions and 56 deletions
+2 -2
View File
@@ -11,11 +11,11 @@ import (
// note: this migration will be deleted in future version
func collectionIdChecksum(typ, name string) string {
return "pbc_" + strconv.Itoa(int(crc32.ChecksumIEEE([]byte(typ+name))))
return "pbc_" + strconv.FormatInt(int64(crc32.ChecksumIEEE([]byte(typ+name))), 10)
}
func fieldIdChecksum(typ, name string) string {
return typ + strconv.Itoa(int(crc32.ChecksumIEEE([]byte(name))))
return typ + strconv.FormatInt(int64(crc32.ChecksumIEEE([]byte(name))), 10)
}
// normalize system collection and field ids