Skip to content

SnappyOutputStream write(arr, offset, length) should check length is less than the array size or 31-bit integer limit #513

Closed

Description

@xerial

There should be an assertion so that length should not exceed the int size limit.

Activity

  1. xerial commented on Oct 3, 2026

    @xerial
    OwnerAuthor

    Fixed in #741 (merged). SnappyOutputStream.write and SnappyInputStream.read now validate offset/length against the array (IndexOutOfBoundsException) and reject typed-array ranges whose byte size overflows int. rawWrite/rawRead are now bounds-checked too, through Snappy.arrayCopy. Ships in 1.1.10.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions