Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: missing LZ4F_freeDecompressionContext #1251

Merged
merged 1 commit into from
Aug 14, 2023
Merged

Conversation

t-mat
Copy link
Contributor

@t-mat t-mat commented Jul 11, 2023

Reported by @BojackMa as issue #1249.

When file size is less than LZ4F_HEADER_SIZE_MAX (19), LZ4F_readOpen() misses to free memory.
Therefore, memory leak happens.

We may also need:

  • Tests for lz4file
    • or run examples/fileCompress with malicious file
  • Run them with valgrind.

Reported by @BojackMa as issue lz4#1249.

When file size is less than LZ4F_HEADER_SIZE_MAX (19), memory leak happens.
@Cyan4973 Cyan4973 merged commit 1f904a7 into lz4:dev Aug 14, 2023
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.

3 participants