From 68a00fc8601ad0a1a5550111b11799cd6aa4ff27 Mon Sep 17 00:00:00 2001 From: zwtmichael Date: Fri, 30 Sep 2022 10:33:37 +0800 Subject: [PATCH] fix secure issue Signed-off-by: zwtmichael --- .../common/include/relational/prepared_stmt.h | 2 +- .../common/include/user_change_monitor.h | 1 - .../libs/distributeddb/common/src/auto_launch.cpp | 13 ++++++------- .../common/src/relational/prepared_stmt.cpp | 4 ++-- .../src/relational/relational_row_data_set.cpp | 3 +++ .../communicator/src/communicator_aggregator.cpp | 11 ++++------- .../communicator/src/protocol_proto.cpp | 9 +++++++-- .../communicator/src/serial_buffer.cpp | 3 ++- .../interfaces/include/kv_store_observer.h | 2 +- .../interfaces/include/relational/store_observer.h | 2 +- .../distributeddb/storage/src/sync_able_engine.cpp | 2 +- .../distributeddb/storage/src/sync_able_kvdb.cpp | 2 +- .../libs/distributeddb/syncer/src/ability_sync.cpp | 2 -- .../libs/distributeddb/syncer/src/db_ability.cpp | 6 +----- .../distributeddb/syncer/src/generic_syncer.cpp | 9 ++++++++- .../syncer/src/single_ver_data_packet.cpp | 3 +++ .../syncer/src/single_ver_sync_state_machine.cpp | 6 ++++++ .../distributeddb/syncer/src/subscribe_manager.cpp | 14 +++++++------- .../libs/distributeddb/syncer/src/sync_operation.h | 3 --- .../libs/distributeddb/syncer/src/syncer_factory.h | 1 + .../distributeddb/syncer/src/value_slice_sync.cpp | 3 --- 21 files changed, 55 insertions(+), 46 deletions(-) diff --git a/frameworks/libs/distributeddb/common/include/relational/prepared_stmt.h b/frameworks/libs/distributeddb/common/include/relational/prepared_stmt.h index 5307b08faac..38eb2fe7cc1 100644 --- a/frameworks/libs/distributeddb/common/include/relational/prepared_stmt.h +++ b/frameworks/libs/distributeddb/common/include/relational/prepared_stmt.h @@ -38,7 +38,7 @@ public: bool IsValid() const; - int CalcLength() const; + uint32_t CalcLength() const; int Serialize(Parcel &parcel) const; int DeSerialize(Parcel &parcel); diff --git a/frameworks/libs/distributeddb/common/include/user_change_monitor.h b/frameworks/libs/distributeddb/common/include/user_change_monitor.h index 6f55d9e18eb..df6d18c9a2f 100644 --- a/frameworks/libs/distributeddb/common/include/user_change_monitor.h +++ b/frameworks/libs/distributeddb/common/include/user_change_monitor.h @@ -20,7 +20,6 @@ #include "macro_utils.h" #include "notification_chain.h" -#include "platform_specific.h" #include "runtime_context.h" namespace DistributedDB { diff --git a/frameworks/libs/distributeddb/common/src/auto_launch.cpp b/frameworks/libs/distributeddb/common/src/auto_launch.cpp index 23471b2d4d8..388840b1256 100644 --- a/frameworks/libs/distributeddb/common/src/auto_launch.cpp +++ b/frameworks/libs/distributeddb/common/src/auto_launch.cpp @@ -47,12 +47,11 @@ void AutoLaunch::SetCommunicatorAggregator(ICommunicatorAggregator *aggregator) LOGI("[AutoLaunch] SetCommunicatorAggregator communicatorAggregator_ is not nullptr"); errCode = communicatorAggregator_->RegOnConnectCallback(nullptr, nullptr); if (errCode != E_OK) { - LOGW("[AutoLaunch] communicatorAggregator_->RegOnConnectCallback(nullptr, nullptr), errCode:%d", errCode); + LOGW("[AutoLaunch] RegOnConnectCallback set nullptr failed, errCode:%d", errCode); } errCode = communicatorAggregator_->RegCommunicatorLackCallback(nullptr, nullptr); if (errCode != E_OK) { - LOGW("[AutoLaunch] communicatorAggregator_->RegCommunicatorLackCallback(nullptr, nullptr), errCode:%d", - errCode); + LOGW("[AutoLaunch] RegCommunicatorLackCallback set nullptr failed, errCode:%d", errCode); } } communicatorAggregator_ = aggregator; @@ -63,13 +62,13 @@ void AutoLaunch::SetCommunicatorAggregator(ICommunicatorAggregator *aggregator) errCode = aggregator->RegOnConnectCallback(std::bind(&AutoLaunch::OnlineCallBack, this, std::placeholders::_1, std::placeholders::_2), nullptr); if (errCode != E_OK) { - LOGW("[AutoLaunch] aggregator->RegOnConnectCallback errCode:%d", errCode); + LOGW("[AutoLaunch] RegOnConnectCallback errCode:%d", errCode); } errCode = aggregator->RegCommunicatorLackCallback( std::bind(&AutoLaunch::ReceiveUnknownIdentifierCallBack, this, std::placeholders::_1, std::placeholders::_2), nullptr); if (errCode != E_OK) { - LOGW("[AutoLaunch] aggregator->RegCommunicatorLackCallback errCode:%d", errCode); + LOGW("[AutoLaunch] RegCommunicatorLackCallback errCode:%d", errCode); } } @@ -606,7 +605,7 @@ void AutoLaunch::GetConnInDoOpenMap(std::mapScheduleTask([&sema, &iter, &items, this] { int ret = OpenOneConnection(iter.second); - LOGI("[AutoLaunch] GetConnInDoOpenMap GetOneConnection errCode:%d\n", ret); + LOGI("[AutoLaunch] GetConnInDoOpenMap GetOneConnection errCode:%d", ret); if (iter.second.conn == nullptr) { sema.SendSemaphore(); LOGI("[AutoLaunch] GetConnInDoOpenMap in open thread finish SendSemaphore"); @@ -661,7 +660,7 @@ void AutoLaunch::ReceiveUnknownIdentifierCallBackTask(const std::string &identif autoLaunchItem = autoLaunchItemMap_[identifier][userId]; } int errCode = OpenOneConnection(autoLaunchItem); - LOGI("[AutoLaunch] ReceiveUnknownIdentifierCallBack GetOneConnection errCode:%d\n", errCode); + LOGI("[AutoLaunch] ReceiveUnknownIdentifierCallBack GetOneConnection errCode:%d", errCode); if (autoLaunchItem.conn == nullptr) { std::lock_guard autoLock(dataLock_); autoLaunchItemMap_[identifier][userId].state = AutoLaunchItemState::IDLE; diff --git a/frameworks/libs/distributeddb/common/src/relational/prepared_stmt.cpp b/frameworks/libs/distributeddb/common/src/relational/prepared_stmt.cpp index 1735cf1ca18..03db2eb0f28 100644 --- a/frameworks/libs/distributeddb/common/src/relational/prepared_stmt.cpp +++ b/frameworks/libs/distributeddb/common/src/relational/prepared_stmt.cpp @@ -56,7 +56,7 @@ bool PreparedStmt::IsValid() const return opCode_ == ExecutorOperation::QUERY && !sql_.empty() && bindArgs_.size() <= DBConstant::MAX_SQL_ARGS_COUNT; } -int PreparedStmt::CalcLength() const +uint32_t PreparedStmt::CalcLength() const { uint32_t length = Parcel::GetIntLen() + // current version Parcel::GetIntLen() + // opcode_ @@ -65,7 +65,7 @@ int PreparedStmt::CalcLength() const for (const auto &bindArg : bindArgs_) { length += Parcel::GetStringLen(bindArg); // bindArgs_ } - return static_cast(Parcel::GetEightByteAlign(length)); + return Parcel::GetEightByteAlign(length); } // Before call this func. You should check if the object is valid. diff --git a/frameworks/libs/distributeddb/common/src/relational/relational_row_data_set.cpp b/frameworks/libs/distributeddb/common/src/relational/relational_row_data_set.cpp index 912f6cc76c2..e602066006e 100644 --- a/frameworks/libs/distributeddb/common/src/relational/relational_row_data_set.cpp +++ b/frameworks/libs/distributeddb/common/src/relational/relational_row_data_set.cpp @@ -149,6 +149,9 @@ int RelationalRowDataSet::Insert(RelationalRowData *rowData) if (rowData == nullptr) { return -E_INVALID_ARGS; } + if ((serialLength_ + static_cast(rowData->CalcLength())) > static_cast(INT32_MAX)) { + return -E_INVALID_ARGS; + } data_.push_back(rowData); serialLength_ += rowData->CalcLength(); return E_OK; diff --git a/frameworks/libs/distributeddb/communicator/src/communicator_aggregator.cpp b/frameworks/libs/distributeddb/communicator/src/communicator_aggregator.cpp index 1ec0fa24a76..c3b3df30e90 100644 --- a/frameworks/libs/distributeddb/communicator/src/communicator_aggregator.cpp +++ b/frameworks/libs/distributeddb/communicator/src/communicator_aggregator.cpp @@ -14,17 +14,14 @@ */ #include "communicator_aggregator.h" -#include -#include -#include -#include + #include "hash.h" -#include "log_print.h" -#include "db_common.h" #include "communicator.h" +#include "communicator_linker.h" +#include "db_common.h" #include "endian_convert.h" +#include "log_print.h" #include "protocol_proto.h" -#include "communicator_linker.h" namespace DistributedDB { namespace { diff --git a/frameworks/libs/distributeddb/communicator/src/protocol_proto.cpp b/frameworks/libs/distributeddb/communicator/src/protocol_proto.cpp index 8d27be2af6c..ed79435483b 100644 --- a/frameworks/libs/distributeddb/communicator/src/protocol_proto.cpp +++ b/frameworks/libs/distributeddb/communicator/src/protocol_proto.cpp @@ -208,14 +208,19 @@ SerialBuffer *ProtocolProto::BuildLabelExchange(uint64_t inDistinctValue, uint64 { // Size of inLabels won't be too large. // The upper layer code(inside this communicator module) guarantee that size of each Label equals COMM_LABEL_LENGTH - uint32_t payloadLen = LABEL_VER_LEN + DISTINCT_VALUE_LEN + SEQUENCE_ID_LEN + COMM_LABEL_COUNT_LEN + + uint64_t payloadLen = LABEL_VER_LEN + DISTINCT_VALUE_LEN + SEQUENCE_ID_LEN + COMM_LABEL_COUNT_LEN + inLabels.size() * COMM_LABEL_LENGTH; + if (payloadLen > INT32_MAX) { + outErrorNo = -E_INVALID_ARGS; + return nullptr; + } SerialBuffer *buffer = new (std::nothrow) SerialBuffer(); if (buffer == nullptr) { outErrorNo = -E_OUT_OF_MEMORY; return nullptr; } - int errCode = buffer->AllocBufferByPayloadLength(payloadLen, GetCommLayerFrameHeaderLength()); + int errCode = buffer->AllocBufferByPayloadLength(static_cast(payloadLen), + GetCommLayerFrameHeaderLength()); if (errCode != E_OK) { LOGE("[Proto][BuildLabel] Alloc Fail, errCode=%d.", errCode); outErrorNo = errCode; diff --git a/frameworks/libs/distributeddb/communicator/src/serial_buffer.cpp b/frameworks/libs/distributeddb/communicator/src/serial_buffer.cpp index 4fbcd89af9f..ae75a154a46 100644 --- a/frameworks/libs/distributeddb/communicator/src/serial_buffer.cpp +++ b/frameworks/libs/distributeddb/communicator/src/serial_buffer.cpp @@ -44,7 +44,8 @@ uint32_t SerialBuffer::GetExtendHeadLength() const // In case buffer be directly send out, so padding is needed int SerialBuffer::AllocBufferByPayloadLength(uint32_t inPayloadLen, uint32_t inHeaderLen) { - if (oringinalBytes_ != nullptr || bytes_ != nullptr || externalBytes_ != nullptr) { + if (oringinalBytes_ != nullptr || bytes_ != nullptr || externalBytes_ != nullptr || + BYTE_8_ALIGN(static_cast(payloadLen_) + static_cast(headerLen_)) > INT32_MAX) { return -E_NOT_PERMIT; } diff --git a/frameworks/libs/distributeddb/interfaces/include/kv_store_observer.h b/frameworks/libs/distributeddb/interfaces/include/kv_store_observer.h index ea74c0c4b85..ab2c9a295dd 100644 --- a/frameworks/libs/distributeddb/interfaces/include/kv_store_observer.h +++ b/frameworks/libs/distributeddb/interfaces/include/kv_store_observer.h @@ -23,7 +23,7 @@ class KvStoreObserver { public: virtual ~KvStoreObserver() {} - // Databa change callback + // Data change callback virtual void OnChange(const KvStoreChangedData &data) = 0; }; } // namespace DistributedDB diff --git a/frameworks/libs/distributeddb/interfaces/include/relational/store_observer.h b/frameworks/libs/distributeddb/interfaces/include/relational/store_observer.h index 6072bbc6946..ea753a3ed89 100644 --- a/frameworks/libs/distributeddb/interfaces/include/relational/store_observer.h +++ b/frameworks/libs/distributeddb/interfaces/include/relational/store_observer.h @@ -23,7 +23,7 @@ class StoreObserver { public: virtual ~StoreObserver() {} - // Databa change callback + // Data change callback virtual void OnChange(const StoreChangedData &data) = 0; }; } // namespace DistributedDB diff --git a/frameworks/libs/distributeddb/storage/src/sync_able_engine.cpp b/frameworks/libs/distributeddb/storage/src/sync_able_engine.cpp index 282e3e68865..fc34669a02d 100644 --- a/frameworks/libs/distributeddb/storage/src/sync_able_engine.cpp +++ b/frameworks/libs/distributeddb/storage/src/sync_able_engine.cpp @@ -178,7 +178,7 @@ void SyncAbleEngine::UserChangeHandle() isNeedChange = (isNeedActive != isSyncNeedActive_) ? true : false; // non_active to active or active to non_active if (isNeedChange) { - StopSyncerWithNoLock(); // will drop userChangeListerner; + StopSyncerWithNoLock(); // will drop userChangeListener isSyncModuleActiveCheck_ = true; isSyncNeedActive_ = isNeedActive; StartSyncerWithNoLock(true, isNeedActive); diff --git a/frameworks/libs/distributeddb/storage/src/sync_able_kvdb.cpp b/frameworks/libs/distributeddb/storage/src/sync_able_kvdb.cpp index fc55252d7d8..21edf7885b8 100644 --- a/frameworks/libs/distributeddb/storage/src/sync_able_kvdb.cpp +++ b/frameworks/libs/distributeddb/storage/src/sync_able_kvdb.cpp @@ -232,7 +232,7 @@ void SyncAbleKvDB::UserChangeHandle() isNeedChange = (isNeedActive != isSyncNeedActive_) ? true : false; // non_active to active or active to non_active if (isNeedChange) { - StopSyncerWithNoLock(); // will drop userChangeListerner; + StopSyncerWithNoLock(); // will drop userChangeListener isSyncModuleActiveCheck_ = true; isSyncNeedActive_ = isNeedActive; StartSyncerWithNoLock(true, isNeedActive); diff --git a/frameworks/libs/distributeddb/syncer/src/ability_sync.cpp b/frameworks/libs/distributeddb/syncer/src/ability_sync.cpp index 38359d61177..b02926d7fa8 100644 --- a/frameworks/libs/distributeddb/syncer/src/ability_sync.cpp +++ b/frameworks/libs/distributeddb/syncer/src/ability_sync.cpp @@ -617,7 +617,6 @@ int AbilitySync::Serialization(uint8_t *buffer, uint32_t length, const Message * case TYPE_REQUEST: return RequestPacketSerialization(buffer, length, inMsg); case TYPE_RESPONSE: - return AckPacketSerialization(buffer, length, inMsg); case TYPE_NOTIFY: return AckPacketSerialization(buffer, length, inMsg); default: @@ -635,7 +634,6 @@ int AbilitySync::DeSerialization(const uint8_t *buffer, uint32_t length, Message case TYPE_REQUEST: return RequestPacketDeSerialization(buffer, length, inMsg); case TYPE_RESPONSE: - return AckPacketDeSerialization(buffer, length, inMsg); case TYPE_NOTIFY: return AckPacketDeSerialization(buffer, length, inMsg); default: diff --git a/frameworks/libs/distributeddb/syncer/src/db_ability.cpp b/frameworks/libs/distributeddb/syncer/src/db_ability.cpp index 54631a3ccd3..9204f52d4e2 100644 --- a/frameworks/libs/distributeddb/syncer/src/db_ability.cpp +++ b/frameworks/libs/distributeddb/syncer/src/db_ability.cpp @@ -66,11 +66,7 @@ int DbAbility::Serialize(Parcel &parcel, const DbAbility &curAbility) uint64_t value = static_cast(abilityBuff[pos]) << innerBuffOffset; dstBuf[buffOffset] = dstBuf[buffOffset] | value; } - int errCode = parcel.WriteVector(dstBuf); - if (errCode != E_OK) { - return errCode; - } - return E_OK; + return parcel.WriteVector(dstBuf); } int DbAbility::DeSerialize(Parcel &parcel, DbAbility &curAbility) diff --git a/frameworks/libs/distributeddb/syncer/src/generic_syncer.cpp b/frameworks/libs/distributeddb/syncer/src/generic_syncer.cpp index 80ea17ad298..f4657850967 100644 --- a/frameworks/libs/distributeddb/syncer/src/generic_syncer.cpp +++ b/frameworks/libs/distributeddb/syncer/src/generic_syncer.cpp @@ -149,7 +149,7 @@ int GenericSyncer::Close(bool isClosedOperation) timeHelper_ = nullptr; metadata_ = nullptr; } - LOGW("[Syncer] Syncer[%s] don't need to close, because it has no been init", label_.c_str()); + LOGW("[Syncer] Syncer[%s] don't need to close, because it has not been init", label_.c_str()); return -E_NOT_INIT; } initialized_ = false; @@ -360,6 +360,10 @@ int GenericSyncer::InitMetaData(ISyncInterface *syncInterface) } metadata_ = std::make_shared(); + if (metadata_ == nullptr) { + LOGE("[Syncer] metadata make shared failed"); + return -E_OUT_OF_MEMORY; + } int errCode = metadata_->Initialize(syncInterface); if (errCode != E_OK) { LOGE("[Syncer] metadata Initializeate failed! err %d.", errCode); @@ -376,6 +380,9 @@ int GenericSyncer::InitTimeHelper(ISyncInterface *syncInterface) } timeHelper_ = std::make_shared(); + if (timeHelper_ == nullptr) { + return -E_OUT_OF_MEMORY; + } int errCode = timeHelper_->Initialize(syncInterface, metadata_); if (errCode != E_OK) { LOGE("[Syncer] TimeHelper init failed! err:%d.", errCode); diff --git a/frameworks/libs/distributeddb/syncer/src/single_ver_data_packet.cpp b/frameworks/libs/distributeddb/syncer/src/single_ver_data_packet.cpp index 135398cd3d0..64f85ba2551 100644 --- a/frameworks/libs/distributeddb/syncer/src/single_ver_data_packet.cpp +++ b/frameworks/libs/distributeddb/syncer/src/single_ver_data_packet.cpp @@ -152,6 +152,9 @@ uint32_t DataRequestPacket::CalculateLen(uint32_t messageId) const { uint64_t totalLen = GenericSingleVerKvEntry::CalculateLens( IsCompressData() ? std::vector {} : data_, version_); // for data + if (totalLen == 0) { + return 0; + } totalLen += Parcel::GetUInt64Len(); // endWaterMark totalLen += Parcel::GetUInt64Len(); // localWaterMark totalLen += Parcel::GetUInt64Len(); // peerWaterMark diff --git a/frameworks/libs/distributeddb/syncer/src/single_ver_sync_state_machine.cpp b/frameworks/libs/distributeddb/syncer/src/single_ver_sync_state_machine.cpp index fc1c9b8617f..5295d2222e0 100644 --- a/frameworks/libs/distributeddb/syncer/src/single_ver_sync_state_machine.cpp +++ b/frameworks/libs/distributeddb/syncer/src/single_ver_sync_state_machine.cpp @@ -129,6 +129,12 @@ int SingleVerSyncStateMachine::Initialize(ISyncTaskContext *context, ISyncInterf timeSync_ = std::make_unique(); dataSync_ = std::make_shared(); abilitySync_ = std::make_unique(); + if ((timeSync_ == nullptr) || (dataSync_ == nullptr) || (abilitySync_ == nullptr)) { + timeSync_ = nullptr; + dataSync_ = nullptr; + abilitySync_ = nullptr; + return -E_OUT_OF_MEMORY; + } errCode = timeSync_->Initialize(communicator, metaData, syncInterface, context->GetDeviceId()); if (errCode != E_OK) { diff --git a/frameworks/libs/distributeddb/syncer/src/subscribe_manager.cpp b/frameworks/libs/distributeddb/syncer/src/subscribe_manager.cpp index 40991b6ec88..f0facc99739 100644 --- a/frameworks/libs/distributeddb/syncer/src/subscribe_manager.cpp +++ b/frameworks/libs/distributeddb/syncer/src/subscribe_manager.cpp @@ -77,7 +77,7 @@ int SubscribeManager::ActiveLocalSubscribeQuery(const std::string &device, const } if (unFinishedLocalAutoSubMap_.find(device) != unFinishedLocalAutoSubMap_.end() && unFinishedLocalAutoSubMap_[device].find(queryId) != unFinishedLocalAutoSubMap_[device].end()) { - unFinishedLocalAutoSubMap_[device].erase(queryId); + unFinishedLocalAutoSubMap_[device].erase(queryId); } return errCode; } @@ -147,12 +147,12 @@ void SubscribeManager::RemoveLocalSubscribeQuery(const std::string &device, cons RemoveSubscribeQuery(device, queryId, localSubscribeMap_, localSubscribeTotalMap_); if (unFinishedLocalAutoSubMap_.find(device) != unFinishedLocalAutoSubMap_.end() && unFinishedLocalAutoSubMap_[device].find(queryId) != unFinishedLocalAutoSubMap_[device].end()) { - unFinishedLocalAutoSubMap_[device].erase(queryId); - LOGI("[SubscribeManager] dev=%s,queryId=%s delete from UnFinishedMap", STR_MASK(device), STR_MASK(queryId)); - if (unFinishedLocalAutoSubMap_[device].size() == 0) { - LOGI("[SubscribeManager] dev=%s delete from unFinish map", STR_MASK(device)); - unFinishedLocalAutoSubMap_.erase(device); - } + unFinishedLocalAutoSubMap_[device].erase(queryId); + LOGI("[SubscribeManager] dev=%s,queryId=%s delete from UnFinishedMap", STR_MASK(device), STR_MASK(queryId)); + if (unFinishedLocalAutoSubMap_[device].size() == 0) { + LOGI("[SubscribeManager] dev=%s delete from unFinish map", STR_MASK(device)); + unFinishedLocalAutoSubMap_.erase(device); + } } } diff --git a/frameworks/libs/distributeddb/syncer/src/sync_operation.h b/frameworks/libs/distributeddb/syncer/src/sync_operation.h index bb4f02c9399..c10013d2aa5 100644 --- a/frameworks/libs/distributeddb/syncer/src/sync_operation.h +++ b/frameworks/libs/distributeddb/syncer/src/sync_operation.h @@ -138,9 +138,6 @@ private: // called by destruction void Finalize(); - // Transfer sync mode from interface to inner - void TransferQuerySyncMode(); - // The device list const std::vector devices_; diff --git a/frameworks/libs/distributeddb/syncer/src/syncer_factory.h b/frameworks/libs/distributeddb/syncer/src/syncer_factory.h index 20e1c45e2bd..e235251d869 100644 --- a/frameworks/libs/distributeddb/syncer/src/syncer_factory.h +++ b/frameworks/libs/distributeddb/syncer/src/syncer_factory.h @@ -26,6 +26,7 @@ public: // Product a ISyncer for the given type // type can be : IKvDBSyncInterface::SYNC_SVD // IKvDBSyncInterface::SYNC_MVD + // IKvDBSyncInterface::SYNC_RELATION static std::shared_ptr GetSyncer(int type); }; } // namespace DistributedDB diff --git a/frameworks/libs/distributeddb/syncer/src/value_slice_sync.cpp b/frameworks/libs/distributeddb/syncer/src/value_slice_sync.cpp index d9490cecb64..62a822b4b7f 100644 --- a/frameworks/libs/distributeddb/syncer/src/value_slice_sync.cpp +++ b/frameworks/libs/distributeddb/syncer/src/value_slice_sync.cpp @@ -292,9 +292,6 @@ int ValueSliceSync::AckRecvCallback(const MultiVerSyncTaskContext *context, cons } LOGD("ValueSliceSync::AckRecvCallback PutValueSlice finished, src=%s{private}, errCode = %d", context->GetDeviceId().c_str(), errCode); - if (errCode != E_OK) { - return errCode; - } return errCode; } -- Gitee