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:37:45 UTC
[jira] Created: (THRIFT-516) If TFramedTransport reads a negative
frame size, throw a TTransportException descendant instead of the default
NegativeArraySizeException
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
Fix For: 0.2
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.
[jira] Updated: (THRIFT-516) If TFramedTransport reads a negative
frame size, throw a TTransportException descendant instead of the default
NegativeArraySizeException
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Commented: (THRIFT-516) If TFramedTransport reads a negative
frame size, throw a TTransportException descendant instead of the default
NegativeArraySizeException
Posted by "David Reiss (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Closed: (THRIFT-516) If TFramedTransport reads a negative
frame size, throw a TTransportException descendant instead of the default
NegativeArraySizeException
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Assigned: (THRIFT-516) If TFramedTransport reads a negative
frame size, throw a TTransportException descendant instead of the default
NegativeArraySizeException
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury reassigned THRIFT-516:
------------------------------------
Assignee: Bryan Duxbury
> 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.
[jira] Updated: (THRIFT-516) If TFramedTransport reads a negative
frame size, throw a TTransportException descendant instead of the default
NegativeArraySizeException
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated THRIFT-516:
---------------------------------
Patch Info: [Patch Available]
> 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.