From 55ef6167a2c235bd88c7216238b2001b46795b79 Mon Sep 17 00:00:00 2001 From: Ryan Mitchell Date: Fri, 13 Nov 2020 23:55:20 +0000 Subject: 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 --- libs/androidfw/ZipFileRO.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'libs/androidfw/ZipFileRO.cpp') 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 @@ -232,29 +232,6 @@ FileMap* ZipFileRO::createEntryFileMap(ZipEntryRO entry) const return newMap; } -/* - * Create a new incfs::IncFsFileMap object that spans the data in "entry". - */ -std::optional 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. * -- cgit v1.2.3-59-g8ed1b