summaryrefslogtreecommitdiffstats
path: root/libs/androidfw/ZipFileRO.cpp
Commit message (Collapse)AuthorAgeFilesLines
* ZipFileRO: Use precise widths for zip file types.Narayan Kamath2015-06-171-3/+4
| | | | | | | | | | | | | | | | | | getEntryInfo crashes on 64-bit devices because "long" types were being passed int pointers (that pointed to a stack frame) that were reinterpret_cast'ed to long* (sigh.). To fix this issue once and for all, use types with explicitly defined widths. This change also removes some dead invariant checking from Asset.cpp instead of cleaning it up. Note that we've introduced a wart in NativeLibraryHelper, where we need to deal with zlib's uLong type, which is "at least 32 bits wide". bug: 21622286 Change-Id: Iae675a9601db7aae03a8b80b40321d2cc1d97f50
* Fix file descriptor leak when opening invalid archives.Narayan Kamath2015-05-121-0/+1
| | | | | | | | | | I've inspected all other callers of OpenArchive and this seems to be the only broken one. The easiest way to reproduce this is by using getPackageArchiveInfo or by adding an asset path that isn't a valid APK. bug: https://code.google.com/p/android/issues/detail?id=171099 Change-Id: I41cd85d20f26ad47968e2a6f1384cc03330b558b
* Track removal of refcounts from FileMap.Narayan Kamath2015-02-231-1/+1
| | | | | | Use delete instead of release. Change-Id: I25c841b368aa9d51e9259399b94cafa2bbb7a076
* Frameworks/base: Wall Werror in libs/androidfwAndreas Gampe2014-11-071-8/+0
| | | | | | | Turn on -Wall -Werror in libs/androidfw. Fix warnings. Refactor some code. Change-Id: I66fe54ace433c15dee5de328b149ca142f74b2dd
* Update ziparchive usage to the new API.Piotr Jastrzebski2014-08-151-6/+5
| | | | | | Bug: 16162465 Change-Id: If3064e2be3e7e85366b07434294a7879b0e5f9bc
* Remove memory leak.Piotr Jastrzebski2014-08-111-0/+4
| | | | | | | Call EndIteration in endIteration to free memory allocated for cookie in StartIteration. Change-Id: I3d58a461c2f3676565cfd7922dc6d8d5c35feae9
* Reimplement ZipFileRO in terms of libziparchive.Narayan Kamath2013-12-091-850/+104
| | | | | | | | | | | | | | | | This lets us share zip archive processing code with both the runtime (Art, dalvik) and critical java code (StrictJarFile). This change also moves several utility methods to ZipUtils and dedups code across several zip inflation methods. One of the side effects of this change is that several processing loops are now O(n) instead of O(n^2). bug: 10193060 Change-Id: I3c7188496837a47246c4f342e45485a70fef3169
* Fix another off-by-one error in ZipFileROKenny Root2013-09-111-1/+1
| | | | | Bug: 10424836 Change-Id: I491458bd31ef39e87127d061427b32a3d59ac807
* Reconcile differences between zip implementationsKenny Root2013-09-111-65/+129
| | | | | | | | Reconcile the difference between ZipFileRO and java.util.ZipFile to have the same behavior. Bug: 10424836 Change-Id: I6bde1bad7e20065ee650945fd43a913c05ce5ac7
* Revert "Reconcile differences between zip implementations"Kenny Root2013-09-111-129/+65
| | | | | | This reverts commit 9ffddc7eb50653cf60ce6b27a0e1945eed5b5ce1. Change-Id: Ifeba63511211bfc2b375f2205e319e91403b7d06
* Reconcile differences between zip implementationsKenny Root2013-09-111-65/+129
| | | | | | | Reconcile the difference between ZipFileRO and java.util.ZipFile to have the same behavior. Bug: 10424836 Change-Id: Iff159c9e1a91b59f6c5346dc0278cb9e4bbc1a39
* libutils clean-upMathias Agopian2013-05-071-0/+931
| | | | Change-Id: I11ee943da23a66828455a9770fc3c5ceb4bbcaa9
* frameworks/base: move Zip* from libandroidfw to libutilsColin Cross2012-03-221-931/+0
| | | | | | | ZipUtils is needed by build/tools, move it from libandroidfw (frameworks/base) to libutils (frameworks/native). Change-Id: I2b4b7adcdf68eb25ee7cba5dd3b69eadf0523af3
* frameworks/base refactoringMathias Agopian2012-02-201-0/+931
create the new libandroidfw from parts of libui and libutils Change-Id: I1584995616fff5d527a2aba63921b682a6194d58