Kafka
  1. Kafka
  2. KAFKA-680

ApiUtils#writeShortString uses String length instead of byte length

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: clients, core
    • Labels:
      None

      Description

      Instead of using the length of the encoded bytes, writeShortString is using String#length. If non single-byte characters are encoded, then things go wrong then decoding the string with readShortString

      1. KAFKA-680.patch
        1 kB
        David Arthur
      2. KAFKA-680v1.patch
        5 kB
        David Arthur

        Activity

        David Arthur created issue -
        David Arthur made changes -
        Field Original Value New Value
        Attachment KAFKA-680.patch [ 12563110 ]
        David Arthur made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        David Arthur added a comment -

        Attaching v1 of patch, included some unit tests

        Show
        David Arthur added a comment - Attaching v1 of patch, included some unit tests
        David Arthur made changes -
        Attachment KAFKA-680v1.patch [ 12563363 ]
        Hide
        Jun Rao added a comment -

        Thanks for the patch. +1. Committed to 0.8 and merged into trunk.

        Show
        Jun Rao added a comment - Thanks for the patch. +1. Committed to 0.8 and merged into trunk.
        Jun Rao made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Fix Version/s 0.8 [ 12317244 ]
        Resolution Fixed [ 1 ]
        Jun Rao made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        4m 21s 1 David Arthur 03/Jan/13 17:52
        In Progress In Progress Resolved Resolved
        1d 3h 53m 1 Jun Rao 04/Jan/13 21:46
        Resolved Resolved Closed Closed
        19s 1 Jun Rao 04/Jan/13 21:46

          People

          • Assignee:
            David Arthur
            Reporter:
            David Arthur
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development