Skip to content

CBOR text gets truncated on decoding #616

@sugmanue

Description

@sugmanue

There are two bugs in the _finishLongTextAscii method introduced in #519 that produces the text to be truncated.

  1. The outPtr is always set to zero (see here) before the read loop. If the out buffer still has room its contents will be overwritten instead of keep adding to it (overwrite or missing chunks.)
  2. If the method exits by fully reading the expected text length, outside the outer loop the length of the last segment is not set, which makes the calling code to drop it when the string is finished (text truncated.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions