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
Loading
Please register or sign in to comment