From: Laszlo Boszormenyi (GCS) Date: Wed, 6 May 2026 21:01:06 +0000 (+0200) Subject: [PATCH] define size as uint64 type X-Git-Tag: archive/raspbian/0.23.0-3+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e088ad54299e3ae8ab62a7e7c5797f9c815fcb3b;p=thrift.git [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 --- 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)) }