OSDN Git Service

Fix file descriptor leak when opening invalid archives.
authorNarayan Kamath <narayan@google.com>
Mon, 11 May 2015 14:45:36 +0000 (15:45 +0100)
committerNarayan Kamath <narayan@google.com>
Tue, 12 May 2015 10:37:18 +0000 (10:37 +0000)
commit5a7587fa90732c013bb9266f1bdae0a557455c15
treed2824499cea406e62df42f717f3b2c735ea32c32
parent227d42db5bd1bd16b6101f799052c10f4f493647
Fix file descriptor leak when opening invalid archives.

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
libs/androidfw/ZipFileRO.cpp