History log of /system/core/libziparchive/zip_archive.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0c1b894b69ff1261f14bad616d8a4ddada186a0d 15-Aug-2014 Piotr Jastrzebski <haaawk@google.com> Reject zip archives with entry names containing \0.

There should never be a need of an entry name with \0 character.

Bug: 16162465

(cherry picked from commit 78271ba97b5d867e3597b7fc2257dd1bbd513b05)

Change-Id: I68c72fb45e8ec70eb125cfc887488bc18ba5447d
/system/core/libziparchive/zip_archive.cc
0047368d7da2ab861c6ec626668c901940297f9c 25-Jul-2014 Neil Fuller <nfuller@google.com> Prevent the accidental closure of fd[0] for missing zip files.

(cherry picked from commit b1a113f618561b274ab793e6401416d449c60449)
Bug: 16530747

Change-Id: I0d1be3dcadfa5128ffe04cec60f6c998dff61991
/system/core/libziparchive/zip_archive.cc
926973ec1486dc7cd4692c7e339d744ea442699c 09-Jun-2014 Narayan Kamath <narayan@google.com> Replace hand written offsets with structures.

Given that all current & future android ABIs are
little endian, we can get rid of the explicit conversions
from memory regions to little endian data members.

Also cleans up a few C style casts that snuck in during
several -Werror efforts and fixes temporary file generation
on target.

bug: 15448202

Change-Id: I4fcbb3c1124cb82c82139d328344e54fc7895353
/system/core/libziparchive/zip_archive.cc
c00de56063deaa3c27ab0f1778730e3f14e9a952 06-Jun-2014 Narayan Kamath <narayan@google.com> Fix build.

Uncommitted changes from a rename.

Change-Id: If1cac7104c436970f905eede683040ae79529292
/system/core/libziparchive/zip_archive.cc
4f6b499ead3de87888d37a74adceaec92c584c0a 03-Jun-2014 Narayan Kamath <narayan@google.com> Reject zip files that have trailing bytes after their CD.

bug: 15287086
Change-Id: I03219c4c2ca6afc9d417a35bd98ae682f478fc25
/system/core/libziparchive/zip_archive.cc
96c5c99bda0d6fec3acb32bc1aea10ebe81be017 09-May-2014 Mark Salyzyn <salyzyn@google.com> libziparchive: off64_t is not int64_t (part deux)

Change-Id: I38e78bdba338a0c40aec43d6c86f26f388cee6ab
/system/core/libziparchive/zip_archive.cc
56a90a08dbbbf96ef415dc6bc84bff2a409efc68 09-May-2014 Mark Salyzyn <salyzyn@google.com> libziparchive: off64_t is not int64_t

- ToDo: investigate why our system headers let us down.

Change-Id: Iada422adbbbd4fbd0fc09b51b97b3cd06ccc6374
/system/core/libziparchive/zip_archive.cc
088bf90e5de251f4b2f2419187d8ee5d7b2bd831 09-May-2014 Mark Salyzyn <salyzyn@google.com> libziparchive: 64 bit issues

Change-Id: I1b53aff5b1527a3623d17deed306624707d345ef
/system/core/libziparchive/zip_archive.cc
51d562d39976451a3a29992b00f36ea54e06c4af 05-May-2014 Mark Salyzyn <salyzyn@google.com> libziparchive: Turn on -Werror

Change-Id: I98a93273b9e1bac0324dd210f6a8493ba780e878
/system/core/libziparchive/zip_archive.cc
99ef9914be1e39276e2e077670368927a1221921 14-Mar-2014 Mark Salyzyn <salyzyn@google.com> libziparchive: 64 bit compile issues

- All within LOG messages.

Change-Id: I52e81b49e8127276359c62febd4cc1d8d69102d9
/system/core/libziparchive/zip_archive.cc
5f98b12640af0fd937c1cd5929248f8f01779922 05-Mar-2014 Mathieu Chartier <mathieuc@google.com> Add free to CloseArchive.

Currently CloseArchive doesn't call free and call sites don't appear
to either. I could not find any call sites which manually freed the
archive by deleting the handle. This fixes several memory leaks.

Change-Id: I21f187dde60fd87e6e54bde06de9e76fd0791104
/system/core/libziparchive/zip_archive.cc
f4b0b7971c0333b7331c2f54384af5de0260ae75 07-Feb-2014 Colin Cross <ccross@android.com> Fix logging errors inside ALOGV

Fix errors exposed by adding checking to disabled ALOGVs.

Change-Id: I36b77bb0ad8dc7661b0f834f20d1179b86134d57
/system/core/libziparchive/zip_archive.cc
48953a1b8fdcf1d6fa1aeeb40c57821d33fc87d2 24-Jan-2014 Narayan Kamath <narayan@google.com> Fix entry handling for 0 length entries.

Two minor issues were fixed:
- The offset to entry data can be the same as the
central directory offset when the last entry in the
file has length 0 and is stored (not deflated). Fix
a check that disallowed this. We already have a strict
check that entry data must end before the central directory,
so we're covered.
- We would attempt to map a segment of length 0 when writing
an entry whose length is 0. We should just return early in
this case.

bug: 12623277
Change-Id: I2a4ca0c4d170cc3cbf326e5ca13894acd9c434c9
/system/core/libziparchive/zip_archive.cc
a1ff801e5f8f896d7961f1b015c75b824e9c44a4 31-Dec-2013 Narayan Kamath <narayan@google.com> Change a debug log to a verbose log.

Unlike ALOGV, messages from ALOGD are logged on
all configurations. Not finding an entry in a zip
file is a "normal" occurrence so using an ALOGD
message for it amounts to spam.

Change-Id: I2c60d11e8a750be5106afd65c3c5e335f53f01b6
/system/core/libziparchive/zip_archive.cc
00a258cec7bbecf10e04fef7ed4781cd750ba1d8 13-Dec-2013 Narayan Kamath <narayan@google.com> Fix ExtractEntryToFile.

We would always write uncompressed data at offset 0 instead
of the current filedescriptor offset.

Also adds a unit-test & a clarifying comment on the API.

Change-Id: If44757e96dde504ce63d81b4dec7115fc6f6d5fb
/system/core/libziparchive/zip_archive.cc
7d92b7cc6580285ab7f8ef86be7512eafda89354 12-Dec-2013 Narayan Kamath <narayan@google.com> Merge "Get rid of some log spam."
f6a196522ac823bef7eb06267e3c00ccdef1d298 12-Dec-2013 Narayan Kamath <narayan@google.com> Get rid of some log spam.

We don't need a warning if an entry isn't found in a zip
file. It can happen as part of normal operation.

Change-Id: I86c132a040371f36f0dd981b49c02b3173821439
/system/core/libziparchive/zip_archive.cc
eaf988532b9e603b1599b7750bfa923fbb39d297 11-Dec-2013 Narayan Kamath <narayan@google.com> Use FileMap from libcutil instead of rolling our own.

Adds windows support as a side effect.

Change-Id: I912c1f980f284d01d4f3936291999646ddf6250a
/system/core/libziparchive/zip_archive.cc
58aaf46e4d3c9f6ada086f88ecf137a9e04db2d9 10-Dec-2013 Narayan Kamath <narayan@google.com> Add unit tests for libziparchive.

- Add a build rule for host tests
- Add basic tests for Find / Iterate and Extract
for both deflated & stored entries.
- Fix an off by one error that the test uncovered.

Change-Id: If72009b1ea9791d5a265829f05c32ffe1c2752c4
/system/core/libziparchive/zip_archive.cc
eb41ad212e125aa81f09df850e0c41e11ba96043 09-Dec-2013 Narayan Kamath <narayan@google.com> Fix return code for ended iteration.

The API promises a return code of -1 for an
ended iteration and lower negative values for
errors.

Change-Id: I688a1ee2efad1bdfc6959cf27e49c0426ebf27f8
/system/core/libziparchive/zip_archive.cc
7462f02f82cce1dd196069e6d84c5c3ea7bf10ff 21-Nov-2013 Narayan Kamath <narayan@google.com> Unify zipfile implementations : Step 1.

Extract zip file processing logic from libdvm into a
standalone library.

This library is a stricter than the libdvm library in
several ways:
- Duplicate zip entry names are now disallowed. Files with
such entries will fail to parse.
- We now verify CD file size information with the individual
file header information. (This was pointed out as a deficiency
of this implementation in past discussions.)
- We also add support for crc checking, which means we might
need to parse the optional data descriptor footer (if one
exists).

We also provide an API for iterating over the entries of
a zip file. This library is optimized for two use cases :

- Lookup for a single entry in the file, with the intention
of processing or extracting the data associated with that
entry
- Iterating over all entries in a file *and* processing
/ extracting their data.

Change-Id: Ia87de6184ef753cc470b0af755c47a4f92ac8198
/system/core/libziparchive/zip_archive.cc