diff options
author | Ryan Mitchell <rtmitchell@google.com> | 2020-11-16 23:08:18 +0000 |
---|---|---|
committer | Ryan Mitchell <rtmitchell@google.com> | 2020-12-08 16:58:12 +0000 |
commit | 80094e39f90801c44cd80ab0f98df505828ea1f3 (patch) | |
tree | e70d5241691a509ce9cf774dc39ce85932fdd1d2 /tools/aapt/ResourceTable.cpp | |
parent | ec7e7f5622e3444a3003db20ddfd8f5745971fa7 (diff) |
Revert^2 "libandroidfw hardening for IncFs"
55ef6167a2c235bd88c7216238b2001b46795b79
Change-Id: I02d4890d181655dfd0a14c188468db512559d27b
Merged-In: I02d4890d181655dfd0a14c188468db512559d27b
Diffstat (limited to 'tools/aapt/ResourceTable.cpp')
-rw-r--r-- | tools/aapt/ResourceTable.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp index d02f44edaa4c..257e96b6e51a 100644 --- a/tools/aapt/ResourceTable.cpp +++ b/tools/aapt/ResourceTable.cpp @@ -3066,7 +3066,7 @@ status_t ResourceTable::flatten(Bundle* bundle, const sp<const ResourceFilter>& for (size_t ti=0; ti<N; ti++) { // Retrieve them in the same order as the type string block. size_t len; - String16 typeName(p->getTypeStrings().stringAt(ti, &len)); + String16 typeName(UnpackOptionalString(p->getTypeStrings().stringAt(ti), &len)); sp<Type> t = p->getTypes().valueFor(typeName); LOG_ALWAYS_FATAL_IF(t == NULL && typeName != String16("<empty>"), "Type name %s not found", @@ -4169,7 +4169,7 @@ status_t ResourceTable::Package::setStrings(const sp<AaptFile>& data, const size_t N = strings->size(); for (size_t i=0; i<N; i++) { size_t len; - mappings->add(String16(strings->stringAt(i, &len)), i); + mappings->add(String16(UnpackOptionalString(strings->stringAt(i), &len)), i); } } return err; |