Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Fix Incorrect conversion between integer types found by GitHub code scanning
天舟1eacb40da2be
diff --git a/server/cache.go b/server/cache.goindex 4a2a52523c..2fbec8d715 100644--- a/server/cache.go+++ b/server/cache.go@@ -32,8 +32,8 @@ func NewCacheService(logger *zap.Logger) *CacheService {}func (s *CacheService) FindCache(namespace api.CacheNamespace, id int, entry interface{}) (bool, error) {- buf1 := []byte{0, 0, 0, 0}- binary.LittleEndian.PutUint32(buf1, uint32(id))+ buf1 := []byte{0, 0, 0, 0, 0, 0, 0, 0}+ binary.LittleEndian.PutUint64(buf1, uint64(id))buf2, has := s.cache.HasGet(nil, append([]byte(namespace), buf1...))if has {@@ -48,8 +48,8 @@ func (s *CacheService) FindCache(namespace api.CacheNamespace, id int, entry int}func (s *CacheService) UpsertCache(namespace api.CacheNamespace, id int, entry interface{}) error {- buf1 := []byte{0, 0, 0, 0}- binary.LittleEndian.PutUint32(buf1, uint32(id))+ buf1 := []byte{0, 0, 0, 0, 0, 0, 0, 0}+ binary.LittleEndian.PutUint64(buf1, uint64(id))var buf2 bytes.Bufferenc := gob.NewEncoder(&buf2)