From db21f09a8e02bcfd3fefea68084667688268f1fa Mon Sep 17 00:00:00 2001 From: Ryan Mitchell Date: Mon, 16 Nov 2020 23:08:18 +0000 Subject: Revert^2 "libandroidfw hardening for IncFs" 55ef6167a2c235bd88c7216238b2001b46795b79 Change-Id: I02d4890d181655dfd0a14c188468db512559d27b --- tools/aapt2/Debug.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools/aapt2/Debug.cpp') diff --git a/tools/aapt2/Debug.cpp b/tools/aapt2/Debug.cpp index 439f231193df..82da24959521 100644 --- a/tools/aapt2/Debug.cpp +++ b/tools/aapt2/Debug.cpp @@ -436,9 +436,9 @@ void Debug::DumpResStringPool(const android::ResStringPool* pool, text::Printer* for (size_t i=0; iisUTF8()) { - uniqueStrings.add(pool->string8At(i, &len)); + uniqueStrings.add(UnpackOptionalString(pool->string8At(i), &len)); } else { - uniqueStrings.add(pool->stringAt(i, &len)); + uniqueStrings.add(UnpackOptionalString(pool->stringAt(i), &len)); } } @@ -450,8 +450,8 @@ void Debug::DumpResStringPool(const android::ResStringPool* pool, text::Printer* const size_t NS = pool->size(); for (size_t s=0; sstring8ObjectAt(s); - printer->Print(StringPrintf("String #%zd : %s\n", s, str.string())); + auto str = pool->string8ObjectAt(s); + printer->Print(StringPrintf("String #%zd : %s\n", s, str.has_value() ? str->string() : "")); } } -- cgit v1.2.3-59-g8ed1b