mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Add null pointer checks for FileInfo/DirInfo
This commit is contained in:
parent
1220befacf
commit
80aead7085
4 changed files with 14 additions and 0 deletions
|
|
@ -60,6 +60,11 @@ FUSE::copy_file_range(const fuse_req_ctx_t *ctx_,
|
|||
FileInfo *src_fi = FileInfo::from_fh(src_ffi_->fh);
|
||||
FileInfo *dst_fi = FileInfo::from_fh(dst_ffi_->fh);
|
||||
|
||||
if(not src_fi)
|
||||
return -EBADF;
|
||||
if(not dst_fi)
|
||||
return -EBADF;
|
||||
|
||||
return ::_copy_file_range(src_fi->fd,
|
||||
src_off_,
|
||||
dst_fi->fd,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue