richgel999 / miniz

miniz: Single C source file zlib-replacement library, originally from code.google.com/p/miniz
MIT License
2.2k stars 322 forks source link

tinfl_decompress_mem_to_heap fails to decompress any input due to early exit in tinfl_decompress #276

Open phildremi opened 1 year ago

phildremi commented 1 year ago

In fe6330e1d8b975ff075ab3bd85709480727e8afa, @jpcha2 added an early exit to tinfl_decompress. Unfortunately, this broke tinfl_decompress_mem_to_heap:

If you run the miniz_tester app before/after the change, you should be able to see it fail in simple_test1.