diff options
author | 2025-06-10 21:27:46 +0000 | |
---|---|---|
committer | 2025-09-18 10:08:02 +0200 | |
commit | 68cf00580d81909ea0474123462a69673d635091 (patch) | |
tree | 39339c57b181f7f4f24768345a7a3e010c59d2ee | |
parent | 0c94512fb24981606406b36284026878df4bcaf2 (diff) |
[SP 2025-09-01] RPC Binder: clearer errors for wrong transact type
Bug: 423127919 # this bug error is totally different
than this case. If we hit this case, we would have
gotten a different harder error. However, I found
this while looking at this bug.
Bug: 416734088
Test: binderRpcTest
Flag: EXEMPT bug fix
Change-Id: I3e0db452ebeed1a520ffc0181ed3577eb38bea9a
Merged-In: I3e0db452ebeed1a520ffc0181ed3577eb38bea9a
(cherry picked from commit 51ed14eebf5a6b7e0d1d6f5b9c81b01a666b270a)
-rw-r--r-- | libs/binder/RpcState.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp index c594d51bf0..feef2d7bd2 100644 --- a/libs/binder/RpcState.cpp +++ b/libs/binder/RpcState.cpp @@ -827,7 +827,12 @@ status_t RpcState::processCommand( switch (command.command) { case RPC_COMMAND_TRANSACT: - if (type != CommandType::ANY) return BAD_TYPE; + if (type != CommandType::ANY) { + ALOGE("CommandType %d, but got RPC command %d.", static_cast<int>(type), + command.command); + (void)session->shutdownAndWait(false); + return BAD_TYPE; + } return processTransact(connection, session, command, std::move(ancillaryFds)); case RPC_COMMAND_DEC_STRONG: return processDecStrong(connection, session, command); |