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
While running some tests, GDeflateDemo crashed due to stack corruption. Upon testing, it turns out that this was due to
libdeflate_gdeflate_compresswriting more data thanlibdeflate_gdeflate_compress_boundindicated was the upper limit.Reproduction steps:
GDeflateDemo /compress gdeflatecrash.bin .gdeflatecrash.zip