From 463fd3b40edbc09d14e1a9a658a60d2f549d299d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=81=E7=AB=9E=E8=8E=9C?= Date: Thu, 27 Mar 2025 14:29:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A9=BA=E6=8C=87=E9=92=88?= =?UTF-8?q?=E5=91=8A=E8=AD=A6=20Signed-off-by:=20=E5=AE=81=E7=AB=9E?= =?UTF-8?q?=E8=8E=9C=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/network/softbus/softbus_handler_asset.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp b/services/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp index f20b72d8f..084eec69a 100644 --- a/services/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp +++ b/services/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp @@ -355,6 +355,11 @@ int32_t SoftBusHandlerAsset::GenerateAssetObjInfo(int32_t socketId, const std::string &fileName, const sptr &assetObj) { + if (assetObj == nullptr) { + LOGE("assetObj is nullptr!"); + return FileManagement::ERR_BAD_VALUE; + } + size_t pos = fileName.find(RELATIVE_PATH_FLAG); if (pos == std::string::npos) { LOGE("Generate dstBundleName fail, firstFile is %{public}s", GetAnonyString(fileName).c_str()); -- Gitee