Skip to content

Commit f3a1244

Browse files
Treehugger RobotGerrit Code Review
authored andcommitted
Merge "libbinder: Return error instead of crashing on closed Trusty connection" into main
2 parents 13c2918 + 5a8c69f commit f3a1244

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)