From d46022ef0788d182927adf3310b418efe8fb4684 Mon Sep 17 00:00:00 2001 From: Luyao Wang Date: Sun, 26 May 2024 19:52:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dsendfile=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BD=8E=E6=A6=82=E7=8E=87crash=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E6=B7=BB=E5=8A=A0=E7=BB=B4=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Luyao Wang --- interfaces/kits/js/src/mod_fs/properties/copy_file.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interfaces/kits/js/src/mod_fs/properties/copy_file.cpp b/interfaces/kits/js/src/mod_fs/properties/copy_file.cpp index 04ec8287e..e6529ec2a 100644 --- a/interfaces/kits/js/src/mod_fs/properties/copy_file.cpp +++ b/interfaces/kits/js/src/mod_fs/properties/copy_file.cpp @@ -93,6 +93,10 @@ static NError SendFileCore(FileInfo& srcFdg, FileInfo& destFdg, struct stat& sta HILOGE("The execution of the sendfile task was terminated, remaining file size %{public}zu", size); return NError(EIO); } + if (sendfile_req.get()->path != NULL) { + HILOGE(" path is not null"); + sendfile_req.get()->path = NULL; + } return NError(ERRNO_NOERR); } -- Gitee