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/10/15 16:15:00 UTC
[jira] [Created] (THRIFT-6424) c_glib: count the recursion depth in thrift_struct_write()
Jens Geyer created THRIFT-6424:
----------------------------------
Summary: c_glib: count the recursion depth in thrift_struct_write()
Key: THRIFT-6424
URL: https://issues.apache.org/jira/browse/THRIFT-6424
Project: Thrift
Issue Type: Sub-task
Components: C glib - Library
Reporter: Jens Geyer
{{thrift_struct_read()}} counts every struct it reads against the protocol's recursion limit, through {{thrift_protocol_increment_input_recursion_depth()}}. {{thrift_struct_write()}} calls the class's {{write}} without a check, and {{ThriftProtocol}} has no counter for the write side, so writing is not limited.
Proposed change: add an output counter next to the input one in {{ThriftProtocol}}, used by {{thrift_struct_write()}} with the same limit. Add tests at the limit and one level past it.
_Drafted with AI assistance (Claude Opus 5.5); reviewed and filed by Jens Geyer._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)