You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Bryan Duxbury (JIRA)" <ji...@apache.org> on 2009/05/22 19:59:45 UTC
[jira] Updated: (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:all-tabpanel ]
Bryan Duxbury updated THRIFT-516:
---------------------------------
Attachment: thrift-516.patch
I think this patch will do the trick.
> 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.