From ba4e3fdca4ab8d485fc68e6052cff7248ae35f87 Mon Sep 17 00:00:00 2001 From: xxxx Date: Wed, 28 Sep 2022 09:40:56 +0800 Subject: [PATCH] Description:Log Rectification Match-id-b68e484eda021ec7a8a104d3369588754490f2d1 --- common/include/input_check_param.cpp | 2 +- common/include/input_check_param.h | 2 +- common/include/white_list_util.cpp | 4 ++-- .../sink/transport/src/distributed_input_sink_transport.cpp | 2 +- .../sourcemanager/src/distributed_input_source_manager.cpp | 4 ++-- .../transport/src/distributed_input_source_transport.cpp | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common/include/input_check_param.cpp b/common/include/input_check_param.cpp index 62cc46b..d0caa35 100644 --- a/common/include/input_check_param.cpp +++ b/common/include/input_check_param.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/common/include/input_check_param.h b/common/include/input_check_param.h index 0665537..700a069 100644 --- a/common/include/input_check_param.h +++ b/common/include/input_check_param.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/common/include/white_list_util.cpp b/common/include/white_list_util.cpp index 73dfcb8..8a5e6dc 100644 --- a/common/include/white_list_util.cpp +++ b/common/include/white_list_util.cpp @@ -44,13 +44,13 @@ namespace { WhiteListUtil::WhiteListUtil() { - DHLOGI("Ctor WhiteListUtil, addr: %p", this); + DHLOGI("Ctor WhiteListUtil."); Init(); } WhiteListUtil::~WhiteListUtil() { - DHLOGI("Dtor WhiteListUtil, addr: %p", this); + DHLOGI("Dtor WhiteListUtil."); } WhiteListUtil &WhiteListUtil::GetInstance(void) diff --git a/services/sink/transport/src/distributed_input_sink_transport.cpp b/services/sink/transport/src/distributed_input_sink_transport.cpp index e164b77..c85c1d1 100644 --- a/services/sink/transport/src/distributed_input_sink_transport.cpp +++ b/services/sink/transport/src/distributed_input_sink_transport.cpp @@ -377,7 +377,7 @@ void DistributedInputSinkTransport::OnSessionClosed(int32_t sessionId) void DistributedInputSinkTransport::OnBytesReceived(int32_t sessionId, const void *data, uint32_t dataLen) { DHLOGI("OnBytesReceived, sessionId: %d, dataLen:%d", sessionId, dataLen); - if (sessionId < 0 || data == nullptr || dataLen <= 0) { + if (sessionId < 0 || data == nullptr || dataLen <= 0 || dataLen > MSG_MAX_SIZE) { DHLOGE("OnBytesReceived param check failed"); return; } diff --git a/services/source/sourcemanager/src/distributed_input_source_manager.cpp b/services/source/sourcemanager/src/distributed_input_source_manager.cpp index 55a65e3..be275bc 100644 --- a/services/source/sourcemanager/src/distributed_input_source_manager.cpp +++ b/services/source/sourcemanager/src/distributed_input_source_manager.cpp @@ -1652,7 +1652,7 @@ int32_t DistributedInputSourceManager::RegisterDelWhiteListCallback(sptr listener) { - DHLOGI("RegisterInputNodeListener, addr: %p", &listener); + DHLOGI("RegisterInputNodeListener."); if (listener == nullptr) { DHLOGE("RegisterInputNodeListener callback is null."); return ERR_DH_INPUT_SERVER_SOURCE_MANAGER_NODE_LISTENER_CALLBACK_ERR; @@ -1664,7 +1664,7 @@ int32_t DistributedInputSourceManager::RegisterInputNodeListener(sptr listener) { - DHLOGI("UnregisterInputNodeListener, addr: %p", &listener); + DHLOGI("UnregisterInputNodeListener."); if (listener == nullptr) { DHLOGE("UnregisterInputNodeListener callback is null."); return ERR_DH_INPUT_SERVER_SOURCE_MANAGER_NODE_LISTENER_CALLBACK_ERR; diff --git a/services/source/transport/src/distributed_input_source_transport.cpp b/services/source/transport/src/distributed_input_source_transport.cpp index bc454fc..5893c80 100644 --- a/services/source/transport/src/distributed_input_source_transport.cpp +++ b/services/source/transport/src/distributed_input_source_transport.cpp @@ -772,7 +772,7 @@ bool DistributedInputSourceTransport::CheckRecivedData(const std::string& messag void DistributedInputSourceTransport::OnBytesReceived(int32_t sessionId, const void *data, uint32_t dataLen) { DHLOGI("OnBytesReceived, sessionId: %d, dataLen:%d", sessionId, dataLen); - if (sessionId < 0 || data == nullptr || dataLen <= 0) { + if (sessionId < 0 || data == nullptr || dataLen <= 0 || dataLen > MSG_MAX_SIZE) { DHLOGE("OnBytesReceived param check failed"); return; }