Uploaded image for project: 'Java Couchbase JVM Core'
  1. Java Couchbase JVM Core
  2. JVMCBC-854

yasjl parser incorrectly publishes a truncated number with > 2 bytes as a result

    XMLWordPrintable

Details

    • Task
    • Resolution: Won't Do
    • Major
    • None
    • None
    • None
    • None
    • 1

    Description

      The logic here https://github.com/couchbase/couchbase-jvm-core/commit/6ad3036b6ec8b6ab4511b8f6422f0501d48b672d#diff-9c94fc0fe943faed5111f33a38a913c0R314 has a bug.

      It's parsing a JSON value, and if it reaches the end of the stream in the middle of the value, it generally throws an exception to signal that it needs more data.

      For reasons I'm not certain on (this code has existed since day one and its creator has now left us), if that value is a number and it's received more than 2 bytes, then it decides to proceed instead.  It raises that potentially truncated number as a valid row.

      (I'm not entirely sure why but this also causes the row processing to finish.)

       

       

       

      Attachments

        For Gerrit Dashboard: JVMCBC-854
        # Subject Branch Project Status CR V

        Activity

          People

            daschl Michael Nitschinger
            graham.pople Graham Pople
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty