Skip to content

CBOR throws ArrayIndexOutOfBoundsException with long ASCII text #640

@sugmanue

Description

@sugmanue

I found another issue with the long ASCII text code path. When the size equals the length of the _outBuf here then the _outBuf will be try to be written to using an out of bound index, since the upper limit for the tight loop down here is set to be int outEnd = size + outPtr;

The exception thrown is

java.lang.ArrayIndexOutOfBoundsException: Index 8538 out of bounds for length 8538

	at com.fasterxml.jackson.dataformat.cbor.CBORParser._finishLongTextAscii(CBORParser.java:2643)

The issue was introduced in #617. I will submit a small change to make sure that we don't attempt to write past the end of the _outBuf.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions