summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2020-12-04 21:13:03 +0000
committermosimchah <mosimchah@gmail.com>2021-03-04 18:54:05 -0500
commitb4ac2acf099444a3472736e6bbf2c662779a8c07 (patch)
tree7851844d79ee6119e4ca84f34e04e8e6f1b0d4b5
parent12bc778784f7c8efa00ee086dfca754083eb3c0d (diff)
libbinder: readString*Inplace SafetyNet (II)q10.0
SafetyNet logs (this time for failure case, instead of success case). Bug: 172655291 Test: adb logcat -b events | grep snet # exactly one occurance w/ repro (c/p'd from 34af0637666f43ae62040ad1bad76468423feba2) Merged-In: I75ace071693c0a4579ed9477f7b9212a6e27c36d Change-Id: I75ace071693c0a4579ed9477f7b9212a6e27c36d Change-Id: I95ef79bac588ed19496b4d6c53e3ae1e4dcce085
-rw-r--r--libs/binder/Parcel.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 06f8bfdb3c..56e698ecc7 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -2192,8 +2192,11 @@ const char16_t* Parcel::readString16Inplace(size_t* outLen) const
if (size >= 0 && size < INT32_MAX) {
*outLen = size;
const char16_t* str = (const char16_t*)readInplace((size+1)*sizeof(char16_t));
- if (str != nullptr && str[size] == u'\0') {
- return str;
+ if (str != nullptr) {
+ if (str[size] == u'\0') {
+ return str;
+ }
+ android_errorWriteLog(0x534e4554, "172655291");
}
}
*outLen = 0;