libzip: libzip-discuss: Re: regression in 0.8/0.9 and ZIP_GPBF_DATA_DESCRIPTOR

Thread

Thread Index

Message

From: Pierre Joye <pierre.php%gmail.com@localhost>
To: libzip-discuss%nih.at@localhost
Subject: Re: regression in 0.8/0.9 and ZIP_GPBF_DATA_DESCRIPTOR
Date: Sun, 22 Mar 2009 17:04:09 +0100

hi,

It seems that the following code (current mercurial head code):

            if (de.bitflags & ZIP_GPBF_DATA_DESCRIPTOR) {

                de.crc = za->cdir->entry[i].crc;
                de.comp_size = za->cdir->entry[i].comp_size;
                de.uncomp_size = za->cdir->entry[i].uncomp_size;
                de.bitflags &= ~ZIP_GPBF_DATA_DESCRIPTOR;
            }

in zip_close.c:196 is gulty.

The data descriptor must be kept untouched or the archive cannot be
read by oOO or some other reader (some flexible reader like textmaker
viewer works, http://www.officeviewers.de/ as they do not care about
the type of the zip archive).

I think it is critical enough (many zip users use it to work with odt
documents) to be solved. I wonder if it would make sense to fire a
minor release for 0.9.0 so an update can be done easily.

About the current code in the hg repository, there are a couple of
issues (integer types detections, portability on win like binary mode,
crash under certain condition) that have been either reintroduced or
never fixed. Have you consider to use a bug tracker? and to publish
the commits via a mailing list? It would make my work easier as I
could catch and follow any issue in an efficient manner :)

Thanks for your work!

Cheers,
--

On Sun, Mar 22, 2009 at 12:52 PM, Pierre Joye <pierre.php%gmail.com@localhost> 
wrote:
> hi,
>
> It seems that the last versions of libzip introduced a regression with
> one of the bug related to ZIP_GPBF_DATA_DESCRIPTOR (or why it was
> introduced). A good reproduce are OpenOffice document, open a
> document, modify it (content.xml for example) and save it. The
> resulting archive can't be opened again with openoffice (2.0/3.0).
>
>
> Cheers,
> --
> Pierre
>
> http://blog.thepimp.net | http://www.libgd.org
>



-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

Made by MHonArc.