Skip to content

JsonTokenizer.close() recycles its buffer for each call to close() which may case data corruption in a multi-threaded environment #77

@niks

Description

@niks

The API specification of close() specifies that

If the stream is already closed then invoking this method has no effect.

But JsonTokenizer.close() violates this by recycling its buffer for each call to close(). This results in the same buffer being provided by the BufferPool to multiple threads that operate on the same buffer causing data corruption.

This is the same issue that was already fixed for the JsonGenerator. See commit 06af407

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