Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cdf3b756 authored by Fabián Cañas's avatar Fabián Cañas
Browse files

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
parent 69e22e9e
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
    }