Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-516

If TFramedTransport reads a negative frame size, throw a TTransportException descendant instead of the default NegativeArraySizeException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.1, 0.2
    • 0.2
    • Java - Library
    • 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.

      Attachments

        1. thrift-516.patch
          0.6 kB
          Bryan Duxbury

        Activity

          People

            bryanduxbury Bryan Duxbury
            bryanduxbury Bryan Duxbury
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: