Skip to content

Use the output buffer position in BitShuffle.unshuffle(ByteBuffer) - #771

Open
anvesha-dev wants to merge 1 commit into
xerial:mainfrom
anvesha-dev:bitshuffle-unshuffle-output-offset
Open

anvesha-dev wants to merge 1 commit into
xerial:mainfrom
anvesha-dev:bitshuffle-unshuffle-output-offset

Conversation

@anvesha-dev

Copy link
Copy Markdown

BitShuffle.unshuffle(ByteBuffer, BitShuffleType, ByteBuffer) checks output.remaining() but passes shuffled.position() as the native destination offset, so when the input buffer's position is ahead of the output's, bshuf_bitunshuffle writes past the checked range and can run off the end of the output direct buffer (the new test puts the input at position 32 and the data lands at result+32 instead of result+0).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant