diff --git a/services/src/platform_callback_stub.cpp b/services/src/platform_callback_stub.cpp index e90a4e77e9beadd066e8acc711fba5ec2664598c..0f9ed2f660ecf23d30300f1d551d6b9666f9ec68 100644 --- a/services/src/platform_callback_stub.cpp +++ b/services/src/platform_callback_stub.cpp @@ -34,6 +34,10 @@ namespace MiscServices { int PlatformCallbackStub::OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option) { + auto descriptorToken = data.ReadInterfaceToken(); + if (descriptorToken != GetDescriptor()) { + return ErrorCode::ERROR_STATUS_UNKNOWN_TRANSACTION; + } switch (code) { case NOTIFY_EVENT: { int eventId = data.ReadInt32(); @@ -101,4 +105,4 @@ namespace MiscServices { MessageHandler::Instance()->SendMessage(msg); } } -} \ No newline at end of file +}