Skip to content

Commit c619ec6

Browse files
Treehugger Robotandroid-build-merge-worker-robot
authored andcommitted
Merge "libbinder: Return error instead of crashing on closed Trusty connection" into main am: f3a1244
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3163657 Change-Id: I6cf325ea095bce32c068c9eec28b4c538c697bfb Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2 parents 8c297a8 + f3a1244 commit c619ec6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

libs/binder/trusty/RpcServerTrusty.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,10 @@ int RpcServerTrusty::handleMessage(const tipc_port* /*port*/, handle_t /*chan*/,
151151

152152
int RpcServerTrusty::handleMessageInternal(void* ctx) {
153153
auto* channelContext = reinterpret_cast<ChannelContext*>(ctx);
154-
LOG_ALWAYS_FATAL_IF(channelContext == nullptr,
155-
"bad state: message received on uninitialized channel");
154+
if (channelContext == nullptr) {
155+
LOG_RPC_DETAIL("bad state: message received on uninitialized channel");
156+
return ERR_BAD_STATE;
157+
}
156158

157159
auto& session = channelContext->session;
158160
auto& connection = channelContext->connection;

0 commit comments

Comments
 (0)