OSDN Git Service

ZipFileRO: Use precise widths for zip file types.
authorNarayan Kamath <narayan@google.com>
Tue, 16 Jun 2015 11:02:57 +0000 (12:02 +0100)
committerNarayan Kamath <narayan@google.com>
Wed, 17 Jun 2015 08:40:25 +0000 (08:40 +0000)
commit4600dd053dbdbd4b95f3b11057a1cc55b99f9c77
treec4bb116de6b55b054a73083165c9512fbf21c164
parent5e063b1da52cca1b93b19bdf7be694aabf95d336
ZipFileRO: Use precise widths for zip file types.

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
cmds/bootanimation/BootAnimation.cpp
cmds/idmap/create.cpp
cmds/idmap/scan.cpp
core/jni/com_android_internal_content_NativeLibraryHelper.cpp
include/androidfw/Asset.h
include/androidfw/ZipFileRO.h
include/androidfw/ZipUtils.h
libs/androidfw/Asset.cpp
libs/androidfw/AssetManager.cpp
libs/androidfw/ZipFileRO.cpp