Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.1, 0.2
-
None
-
Patch Available
Description
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.