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

Field IDs > 255 fail with compact protocol

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.3, 0.9.3.1, 0.10.0, 0.11.0, 0.12.0
    • 0.13.0
    • Delphi - Library
    • None
    • Patch Available

    Description

      The following struct cannot be read with Delphi's TCompactProtocol implementation, because an 8 bit integer is used instead of a 16 bit integer for the field ID. Depending on the compiler settings this leads to either a range check error or data loss.

      struct Foo {
         500 : i64  field500;
        5000 : i64  field5000;
        20000 : i64  field20000;
      }
      

      Attachments

        Activity

          People

            jensg Jens Geyer
            jensg Jens Geyer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m