miniz: Single C source file zlib-replacement library, originally from code.google.com/p/miniz
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
In fe6330e1d8b975ff075ab3bd85709480727e8afa, @jpcha2 added an early exit to
tinfl_decompress
. Unfortunately, this broketinfl_decompress_mem_to_heap
:tinfl_decompress_mem_to_heap
is first called, the output buffer is not yet allocated (NULL
)tinfl_decompress
receives this value and now exits early with error codeTINFL_STATUS_BAD_PARAM
tinfl_decompress_mem_to_heap
to returnNULL
as well, without any decompression having taken placeIf you run the miniz_tester app before/after the change, you should be able to see it fail in simple_test1.