Skip to content

Limit initial allocated block size by ByteArrayBuilder to max block size #639

@cowtowncoder

Description

@cowtowncoder

Although increase of block sizes is capped to 128k by ByteArrayBuilder, initial block size is not limited.
Databind used to try to allocate full block for base64 decoding, and due to miscalculation in an earlier version (up 2.9.x), was vastly overallocating, leading to potential failures.
But since builder is supposed to segment content anyway let's limit size of the initial block to strict per-block maximum: seems pointless not to do that.

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