Skip to content

Never return pooled Uint8Array instances #64

@ChALkeR

Description

@ChALkeR

Node.js codepaths might be returning pooled buffers which we are then casting to Uint8Arrays, which is cursed.

When the user requests to typecast to a Buffer, returning pooled Buffers on Node.js is acceptable as that's what Buffer.from does

Not only TextEncoder, but likely none of the APIs should return pooled Uint8Arrays

Changes:

Tests only:

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