Skip to content

big endian machines could hypothetically decode TypedArrays higher than 8 incorrecdtly #64

@samualtnorman

Description

@samualtnorman

for example seroval encodes new Uint16Array([ 0, 0, 0, 0, 0, 65535, 3435, 1688 ]) as new Uint16Array(new Uint8Array([0,0,0,0,0,0,0,0,0,0,255,255,107,13,152,6]).buffer,0,8) which works when encoding and decoding on little-endian machines but will hypothetically decode incorrectly to new Uint16Array([ 0, 0, 0, 0, 0, 65535, 27405, 38918 ]) on a big-endian machine.

I say hypothetically because I've never actually seen this happen because I don't have any big-endian devices, I just know this is something the spec allows JavaScript engines to do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions