You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by "Dmytro Shteflyuk (Jira)" <ji...@apache.org> on 2026/08/26 23:43:00 UTC
[jira] [Commented] (THRIFT-1698) BaseTransport is missing nil check in read_all
[ https://issues.apache.org/jira/browse/THRIFT-1698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18108571#comment-18108571 ]
Dmytro Shteflyuk commented on THRIFT-1698:
------------------------------------------
Fixed by [THRIFT-6144|https://issues.apache.org/jira/browse/THRIFT-6144] in 0.25.0.
The merged change updates BaseTransport#read_all to raise TransportException::END_OF_FILE when an initial or subsequent read returns nil or an empty string, and includes a regression for the nil-read case reported here.
Commit: [0f4aa6ffb7a2dc8e955ad4782d06eda282d9711b|https://github.com/apache/thrift/commit/0f4aa6ffb7a2dc8e955ad4782d06eda282d9711b]
> BaseTransport is missing nil check in read_all
> ----------------------------------------------
>
> Key: THRIFT-1698
> URL: https://issues.apache.org/jira/browse/THRIFT-1698
> Project: Thrift
> Issue Type: Bug
> Components: Ruby - Library
> Affects Versions: 0.8
> Reporter: Kevin Radloff
> Priority: Minor
> Attachments: thrift.diff
>
>
> The code in BaseTransport#read_all does not check that the return value from #read is non-nil. I haven't checked all the transport classes, but I know this is possible from the IOStreamTransport. Either #read_all needs a nil check, or transport classes need to be modified to never return nil from their #read methods.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)