summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Fabián Cañas <fabiancanas@google.com> 2023-03-10 13:20:42 -0500
committer Fabián Cañas <fabiancanas@google.com> 2023-03-10 13:22:52 -0500
commitcdf3b756fde6e901bca3c98380ae2700f7bdcac2 (patch)
treeccb657bbd183dc9779f0a8c8597e713e56d22491
parent69e22e9ea51f01b63e06a621a8c5a977617214fa (diff)
Avoid bad string conversion in RecordedBinder error log
BUG=271730529 Test: This was discovered by an existing fuzz test, and should be reproducible that way. Or create a recording with record_binder and edit the interface name to include an emoji or other multi-byte character. Change-Id: I91b301f8930f5e3abbda531ce89e4b55a8c2e319
-rw-r--r--libs/binder/RecordedTransaction.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/libs/binder/RecordedTransaction.cpp b/libs/binder/RecordedTransaction.cpp
index 51b971651d..ef58ed365f 100644
--- a/libs/binder/RecordedTransaction.cpp
+++ b/libs/binder/RecordedTransaction.cpp
@@ -127,8 +127,7 @@ std::optional<RecordedTransaction> RecordedTransaction::fromDetails(
t.mData.mInterfaceName = std::string(String8(interfaceName).string());
if (interfaceName.size() != t.mData.mInterfaceName.size()) {
LOG(ERROR) << "Interface Name is not valid. Contains characters that aren't single byte "
- "utf-8: "
- << interfaceName;
+ "utf-8.";
return std::nullopt;
}