diff --git a/common/src/ipc/standard/ipc_model_codec.cpp b/common/src/ipc/standard/ipc_model_codec.cpp index 7829e95ab120392e29fbd24098ab762b2695c9d2..790ef906775c464b8450a96c7f73862092c8d965 100644 --- a/common/src/ipc/standard/ipc_model_codec.cpp +++ b/common/src/ipc/standard/ipc_model_codec.cpp @@ -380,6 +380,7 @@ bool IpcModelCodec::EncodeLocalServiceInfos(const std::vector IPC_VECTOR_MAX_SIZE) { LOGE("num is Invalid value, num = %{public}u", num); + return false; } for (uint32_t k = 0; k < num; k++) { DMLocalServiceInfo serviceInfo = serviceInfos[k]; diff --git a/services/implementation/src/device_manager_service_impl.cpp b/services/implementation/src/device_manager_service_impl.cpp index fe6fe34d0a9923c95cc2d9ad38b80143170e7d90..7f64a2897ce7f91d45ce45b2f010af27078dd08b 100644 --- a/services/implementation/src/device_manager_service_impl.cpp +++ b/services/implementation/src/device_manager_service_impl.cpp @@ -914,6 +914,7 @@ int32_t DeviceManagerServiceImpl::TransferSrcOldAuthMgr(std::shared_ptr auto authMgr = GetAuthMgrByTokenId(tokenId); if (authMgr == nullptr) { LOGE("DeviceManagerServiceImpl::TransferSrcOldAuthMgr authManager is nullptr"); + return ERR_DM_POINT_NULL; } authMgr->GetBindTargetParams(pkgName, peerTargetId, bindParam); int32_t authType = -1;