From e088ad54299e3ae8ab62a7e7c5797f9c815fcb3b Mon Sep 17 00:00:00 2001 From: "Laszlo Boszormenyi (GCS)" Date: Wed, 6 May 2026 23:01:06 +0200 Subject: [PATCH] [PATCH] define size as uint64 type 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/go/thrift/framed_transport.go b/lib/go/thrift/framed_transport.go index 00f277e..9de678e 100644 --- a/lib/go/thrift/framed_transport.go +++ b/lib/go/thrift/framed_transport.go @@ -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)) } -- 2.39.5