From 926913ad66413e673df59e515d464a3497c88158 Mon Sep 17 00:00:00 2001 From: jennifersp Date: Wed, 21 Aug 2024 15:12:36 -0700 Subject: [PATCH] rm bound check --- pgtype/uint32.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pgtype/uint32.go b/pgtype/uint32.go index a668bda45..3f0e8fec7 100644 --- a/pgtype/uint32.go +++ b/pgtype/uint32.go @@ -296,12 +296,7 @@ func (scanPlanBinaryTextToUint32Scanner) Scan(src []byte, dst any) error { return s.ScanText(Text{}) } - if len(src) != 4 { - return fmt.Errorf("invalid length for uint32: %v", len(src)) - } - n := uint64(binary.BigEndian.Uint32(src)) - return s.ScanText(Text{String: strconv.FormatUint(n, 10), Valid: true}) }