apache / apache/arrow-java

[Java] ZSTD compression issue

Open
#169 3 comments 0 reactions 1 assignee Claimed by @vibhatha View on GitHub
Dominant language
Java
Stars
94
Forks
152
Avg merge
3d 16h
Merged PRs (30d)
11

Description

### Describe the bug, including details regarding any error messages, version, and platform.

The second parameter of the compressUnsafe function represents the available space in the destination buffer, so maxSize should be used here instead of destSize. It can lead to memory access out of bounds

Code location:
https://github.com/apache/arrow/blob/main/java/compression/src/main/java/org/apache/arrow/compression/ZstdCompressionCodec.java#L50C107-L50C114

### Component(s)

Java

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.