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

TJSONProtocol Java readString throws on bounds check

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.14.0, 0.14.1
    • Fix Version/s: 0.15.0, 0.14.2
    • Component/s: Java - Library
    • Labels:
      None

      Description

      https://github.com/apache/thrift/blob/7e537505f014d8ede86f30a7500136c2f3e99505/lib/java/src/org/apache/thrift/protocol/TJSONProtocol.java#L976 this line appears to be unnecessary. The following code works with thrift 0.13.0 and fails with an exception on 0.14.x 

      TMemoryBuffer buf = new TMemoryBuffer(11); TMemoryBuffer buf = new TMemoryBuffer(11);
      TJSONProtocol prot = new TJSONProtocol(buf);
      prot.writeString("yeehaw");
      prot.readString();

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                aaron.stgeorge Aaron St. George
                Reporter:
                aaron.stgeorge Aaron St. George
              • Votes:
                0 Vote for this issue
                Watchers:
                3 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 - 2h 10m
                  2h 10m