[ 
https://issues.apache.org/jira/browse/THRIFT-516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bryan Duxbury closed THRIFT-516.
--------------------------------

    Resolution: Fixed

Committed.

> 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.

Reply via email to