diff options
author | Ryan Mitchell <rtmitchell@google.com> | 2020-11-13 23:55:20 +0000 |
---|---|---|
committer | Ryan Mitchell <rtmitchell@google.com> | 2020-11-13 23:55:20 +0000 |
commit | 55ef6167a2c235bd88c7216238b2001b46795b79 (patch) | |
tree | 5a63ff5e6b8a0ade4ce5aa2c4d663d62a7d993d9 /libs/androidfw/ZipFileRO.cpp | |
parent | 6ca48473e533a8b89abac6294a0bb8130b8c8c89 (diff) |
Revert "libandroidfw hardening for IncFs"
Revert "Move map_ptr to incfs namspace"
Revert submission 12787270
Reason for revert: b/173250495
Reverted Changes:
I5cd1bc8a2:libandroidfw hardening for IncFs
Ice5dbcfb2:Move map_ptr to incfs namspace
I29ccdc8ed:Do not cache bag parent stack until requested
I1e9e9acaa:Cache resolved theme values
Change-Id: Ib90ef68339710086df41e9abe0833a542d03a74f
Diffstat (limited to 'libs/androidfw/ZipFileRO.cpp')
-rw-r--r-- | libs/androidfw/ZipFileRO.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/libs/androidfw/ZipFileRO.cpp b/libs/androidfw/ZipFileRO.cpp index 52e7a70521a1..e77ac3df474c 100644 --- a/libs/androidfw/ZipFileRO.cpp +++ b/libs/androidfw/ZipFileRO.cpp @@ -233,29 +233,6 @@ FileMap* ZipFileRO::createEntryFileMap(ZipEntryRO entry) const } /* - * Create a new incfs::IncFsFileMap object that spans the data in "entry". - */ -std::optional<incfs::IncFsFileMap> ZipFileRO::createEntryIncFsFileMap(ZipEntryRO entry) const -{ - const _ZipEntryRO *zipEntry = reinterpret_cast<_ZipEntryRO*>(entry); - const ZipEntry& ze = zipEntry->entry; - int fd = GetFileDescriptor(mHandle); - size_t actualLen = 0; - - if (ze.method == kCompressStored) { - actualLen = ze.uncompressed_length; - } else { - actualLen = ze.compressed_length; - } - - incfs::IncFsFileMap newMap; - if (!newMap.Create(fd, ze.offset, actualLen, mFileName)) { - return std::nullopt; - } - return std::move(newMap); -} - -/* * Uncompress an entry, in its entirety, into the provided output buffer. * * This doesn't verify the data's CRC, which might be useful for |