You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "David Reiss (JIRA)" <ji...@apache.org> on 2009/05/22 22:10:45 UTC
[jira] Commented: (THRIFT-516) If TFramedTransport reads a negative
frame size, throw a TTransportException descendant instead of the default
NegativeArraySizeException
[ https://issues.apache.org/jira/browse/THRIFT-516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712233#action_12712233 ]
David Reiss commented on THRIFT-516:
------------------------------------
LG
> If TFramedTransport reads a negative frame size, throw a TTransportException descendant instead of the default NegativeArraySizeException
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: THRIFT-516
> URL: https://issues.apache.org/jira/browse/THRIFT-516
> Project: Thrift
> Issue Type: Bug
> Components: Library (Java)
> Affects Versions: 0.1, 0.2
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Fix For: 0.2
>
> Attachments: thrift-516.patch
>
>
> If TFramedTransport manages to read a negative-sized frame header off the wire, it will blithely try to create a buffer with negative size. This throws a NegativeArraySizeException, which is a undeclared exception type. The upshot is that even if you are catching TTransportExceptions, you will end up with an untrapped exception, which seems stupid.
> We should check if the size is negative and throw an appropriate declared exception instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.