[PATCH] define size as uint64 type
authorLaszlo Boszormenyi (GCS) <gcs@debian.org>
Wed, 6 May 2026 21:01:06 +0000 (23:01 +0200)
committerLaszlo Boszormenyi (GCS) <gcs@debian.org>
Sat, 9 May 2026 13:29:42 +0000 (13:29 +0000)
Define size variable to be uint64 type to hold possible writeBuf values and
make the comparison reasonable.

Gbp-Pq: Name go_size_uint64.patch

lib/go/thrift/framed_transport.go

index 00f277e1819ea672a076f0f4e1e350efaa2c501d..9de678ea70441268306ba7a49607abcd18cb162c 100644 (file)
@@ -202,7 +202,7 @@ func (p *TFramedTransport) WriteString(s string) (n int, err error) {
 }
 
 func (p *TFramedTransport) Flush(ctx context.Context) error {
-       size := p.writeBuf.Len()
+       size := uint64(p.writeBuf.Len())
        if size > math.MaxUint32 {
                return NewTTransportException(UNKNOWN_TRANSPORT_EXCEPTION, fmt.Sprintf("frame too large: %d bytes exceeds uint32 max",size))
        }