Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Memory stomp due to libdeflate_gdeflate_compress_bound returning too small of a value and libdeflate_gdeflate_compress ignoring the output limit

Open
#41 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
backend

Research direction

Start by reproducing the crash with GDeflateDemo in debug mode using the attached gdeflatecrash.bin, then inspect libdeflate_gdeflate_compress_bound and libdeflate_gdeflate_compress. Done means the reported bound is sufficient and compression no longer writes beyond the supplied output limit for this reproduction.

Written by the indexing model from the issue text.

Description

While running some tests, GDeflateDemo crashed due to stack corruption. Upon testing, it turns out that this was due to libdeflate_gdeflate_compress writing more data than libdeflate_gdeflate_compress_bound indicated was the upper limit.

Reproduction steps:

  • Extract "gdeflatecrash.bin" from the attached file
  • Compile GDeflateDemo in debug mode so stack corruption checks are enabled
  • Run GDeflateDemo /compress gdeflatecrash.bin .

gdeflatecrash.zip

Dominant language
C++
Stars
897
Forks
111
Avg merge
13h 58m
Merged PRs (30d)
12

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/DirectStorage

All issues in microsoft/DirectStorage

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.