Objective-Zip icon indicating copy to clipboard operation
Objective-Zip copied to clipboard

MiniZip unzip.c hava some bug, it need to be make modifications

Open happyhell opened this issue 6 years ago • 2 comments

// if (len > UINT16_MAX) // return UNZ_PARAMERROR;

s->pfile_in_zip_read->stream.next_out = (Bytef*)buf;
s->pfile_in_zip_read->stream.avail_out = (uInt)len;

if (s->pfile_in_zip_read->raw)
{
    if (len > s->pfile_in_zip_read->rest_read_compressed + s->pfile_in_zip_read->stream.avail_in)
        s->pfile_in_zip_read->stream.avail_out = (uInt)s->pfile_in_zip_read->rest_read_compressed +
            s->pfile_in_zip_read->stream.avail_in;
}
else
{
    if (len > s->pfile_in_zip_read->rest_read_uncompressed)
        s->pfile_in_zip_read->stream.avail_out = (uInt)s->pfile_in_zip_read->rest_read_uncompressed;
}

happyhell avatar Apr 07 '18 05:04 happyhell

@nmoinvaz Any word on this?

gianlucabertani avatar Apr 07 '18 07:04 gianlucabertani

I don't see the problem. I am also not developing the old branch any longer. I will accept pull requests on it though.

nmoinvaz avatar Apr 07 '18 18:04 nmoinvaz