Skip to content

Conversation

@Marcono1234
Copy link

@Marcono1234 Marcono1234 commented Jun 15, 2025

This code branch is executed if there are less than SIZE_OF_INT bytes available, so it should not try to read an int then. That code apparently was only acting as assertion that the code is implemented correctly anyway.

Note that in reality this out-of-bounds read most likely would have never happened because ZstdInputStream always provides it with a large enough buffer (unless users directly used ZstdIncrementalFrameDecompressor, which they probably shouldn't).

Edit: Or maybe this out-of-bounds read could occur, depending on how the data is laid out, and the sizes of the arrays.

This code branch is executed if there are less than SIZE_OF_INT bytes available,
so it should not try to read an int then. That code apparently was only acting
as assertion that the code is implemented correctly anyway.

Note that in reality this out-of-bounds read most likely would have never
happened because ZstdInputStream always provides it with a large enough buffer
(unless users directly used ZstdIncrementalFrameDecompressor, which they
probably shouldn't).
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