summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2018-07-17 15:00:31 -0700
committerJosh Gao <jmgao@google.com>2018-08-14 16:45:46 -0700
commit5fc8bbe1140879141893980194db18760bf8876a (patch)
treeefb251621c390aa5ed5040d041a11be66920631b /tools/aapt2/java/JavaClassGenerator_test.cpp
parent0f7d0f4e94615d46e7468e7d41dd20f77cdb9a80 (diff)
Fix double close in NativeLibraryHelper.openApkFd.
Prior to this patch, we were taking the file descriptor owned by a ParcelFileDescriptor, and passing it into ZipFileRO::openFd, which expects to take ownership of the file descriptor, closing it upon destruction. This leads to a double-close when the ParcelFileDescriptor tries to close itself. Switch to passing a duped copy of the file descriptor to ZipFileRO::openFd. Test: `pm install foo.apk` with fdsan Change-Id: Ida4ca4a37b82875dc4eef1f37bf2322c422fe038 (cherry-picked from commit b066087d65b720a5c9ac48f64a856284566df82f)
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions