summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Mitchell <rtmitchell@google.com>2018-05-21 13:59:23 -0700
committerTim Schumacher <timschumi@gmx.de>2018-08-08 21:21:05 +0200
commitaa5bbcd03559b1b0101d1fd4a1d8d2bd30e4fff2 (patch)
treeb6457f731526b87219752090303d0bd3f6941554
parent44511f01264970aa34cd76c26070fb2fb464a4b7 (diff)
downloadframeworks_base-aa5bbcd03559b1b0101d1fd4a1d8d2bd30e4fff2.tar.gz
frameworks_base-aa5bbcd03559b1b0101d1fd4a1d8d2bd30e4fff2.tar.bz2
frameworks_base-aa5bbcd03559b1b0101d1fd4a1d8d2bd30e4fff2.zip
ResStringPool: Prevenet boot loop from se fix
Changes the logs adding in a previous security fix to warnings so devices with malformed APKs currently on them will not undergo DOS when they are upgraded to P. Bug: 79724567 Test: run cts -m CtsAppSecurityHostTestCases \ -t android.appsecurity.cts.CorruptApkTests Change-Id: Ied54e4bb14abdaf79da562022c7ea6075187c1f8 (cherry picked from commit f05f47b2c1838529e682ad8f931d3da72244b1a1) (cherry picked from commit c31cf80008fdb06ea8e1eab9764096653e7854b1)
-rw-r--r--libs/androidfw/ResourceTypes.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp
index da3f5c6d0a9..538323d0c38 100644
--- a/libs/androidfw/ResourceTypes.cpp
+++ b/libs/androidfw/ResourceTypes.cpp
@@ -466,7 +466,7 @@ status_t ResStringPool::setTo(const void* data, size_t size, bool copyData)
// The chunk must be at least the size of the string pool header.
if (size < sizeof(ResStringPool_header)) {
- LOG_ALWAYS_FATAL("Bad string block: data size %zu is too small to be a string block", size);
+ ALOGW("Bad string block: data size %zu is too small to be a string block", size);
return (mError=BAD_TYPE);
}
@@ -476,7 +476,7 @@ status_t ResStringPool::setTo(const void* data, size_t size, bool copyData)
if (validate_chunk(reinterpret_cast<const ResChunk_header*>(data), sizeof(ResStringPool_header),
reinterpret_cast<const uint8_t*>(data) + size,
"ResStringPool_header") != NO_ERROR) {
- LOG_ALWAYS_FATAL("Bad string block: malformed block dimensions");
+ ALOGW("Bad string block: malformed block dimensions");
return (mError=BAD_TYPE);
}