Skip to content
Commit b066087d authored by Josh Gao's avatar Josh Gao
Browse files

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
parent 55ce82b1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment