You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by "Jens Geyer (Jira)" <ji...@apache.org> on 2026/09/17 22:03:00 UTC
[jira] [Resolved] (THRIFT-6281) Go: TFramedTransport.Flush writes frames larger than the configured MaxFrameSize
[ https://issues.apache.org/jira/browse/THRIFT-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jens Geyer resolved THRIFT-6281.
--------------------------------
Fix Version/s: 0.25.0
Assignee: Jens Geyer
Resolution: Fixed
> Go: TFramedTransport.Flush writes frames larger than the configured MaxFrameSize
> --------------------------------------------------------------------------------
>
> Key: THRIFT-6281
> URL: https://issues.apache.org/jira/browse/THRIFT-6281
> Project: Thrift
> Issue Type: Bug
> Components: Go - Library
> Reporter: Jens Geyer
> Assignee: Jens Geyer
> Priority: Minor
> Fix For: 0.25.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Found while working on THRIFT-6262, which does the same for {{THeaderTransport}} (PR #3860).
> {{TFramedTransport.Flush}} ({{lib/go/thrift/framed_transport.go}}) checks the frame against {{math.MaxUint32}} only. The transport's configured {{MaxFrameSize}}, which {{readFrameHeader}} applies to every frame it reads, is not applied to the frames it writes.
> Measured on master with {{MaxFrameSize: 1024}}:
> * {{Flush}} of a 2048-byte frame returns nil and writes 2052 bytes.
> * A {{TFramedTransport}} holding the same configuration refuses that frame with "Incorrect frame size (2048)".
> h2. Suggested
> Check the frame against {{GetMaxFrameSize()}} before writing the length, as {{THeaderTransport.Flush}} now does, and refuse it with nothing written.
> _Drafted with AI assistance (Claude Opus 5); reviewed and filed by Jens Geyer._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)