You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
elasota
changed the title
libdeflate_gdeflate_compress_bound sometimes returns a value that is too small to store the compressed output
Memory stomp due to libdeflate_gdeflate_compress_bound returning too small of a value and libdeflate_gdeflate_compress ignoring the output limit
Jun 3, 2024
I guess this is actually a 2-part bug: libdeflate_gdeflate_compress_bound returns too small of a value, but libdeflate_gdeflate_compress is also supposed to fail safely if more output is written than is specified in the page buffer, which it sometimes does, but with this sample, it is stomping memory above the provided limit.
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 thanlibdeflate_gdeflate_compress_bound
indicated was the upper limit.Reproduction steps:
GDeflateDemo /compress gdeflatecrash.bin .
gdeflatecrash.zip
The text was updated successfully, but these errors were encountered: