[Zlib-devel] zlib 1.2.3.4 Winter Solstice Edition
Gilles Vollant
info at winimage.com
Sun Dec 27 21:25:03 EST 2009
try http://gvollant.free.fr/minizip101h_proposal.zip
sorry for the error
-----Message d'origine-----
De : zlib-devel-bounces at madler.net [mailto:zlib-devel-bounces at madler.net] De
la part de Hiroshi Kuno
Envoyé : lundi 28 décembre 2009 02:39
À : zlib-devel at madler.net
Objet : Re: [Zlib-devel] zlib 1.2.3.4 Winter Solstice Edition
(2009/12/26 4:52), Gilles Vollant wrote:
> here is the real mail I answered.
> I just integrated Hiroshi Kuno and Rolf Kalbermatter suggestion
Gilles, My patch is not merged on minizip101g. is it?
I make a patch again for minizip101g.
The patch avoid to over-write "err" from "ZIP_ERRNO" to "ZIP_OK".
When disk-full or other I/O error occurs, zipFlushWriteBuffer() returns
"ZIP_ERRNO", and deflateEnd() returns "ZIP_OK".
In this case, the error is lost and Minizip will make a broken zip file with
"ZIP_OK".
*** minizip101g/zip.c Mon Dec 28 01:07:38 2009
--- mypatch/zip.c Fri Dec 25 08:27:15 2009
***************
*** 1073,1085 ****
if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK))
if (zipFlushWriteBuffer(zi)==ZIP_ERRNO)
err = ZIP_ERRNO;
if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
{
! err=deflateEnd(&zi->ci.stream);
zi->ci.stream_initialised = 0;
}
if (!zi->ci.raw)
{
crc32 = (uLong)zi->ci.crc32;
--- 1075,1088 ----
if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK))
if (zipFlushWriteBuffer(zi)==ZIP_ERRNO)
err = ZIP_ERRNO;
if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
{
! int tmperr=deflateEnd(&zi->ci.stream);
! if (err==ZIP_OK) err = tmperr;
zi->ci.stream_initialised = 0;
}
if (!zi->ci.raw)
{
crc32 = (uLong)zi->ci.crc32;
_______________________________________________
Zlib-devel mailing list
Zlib-devel at madler.net
http://mail.madler.net/mailman/listinfo/zlib-devel_madler.net
More information about the Zlib-devel
mailing list