Fix null ptr dereference on systems with SENDFILE7. FreeBSD for example

pull/3530/head
Isaac Connor 2022-07-14 09:50:19 -04:00
parent bc12205ec3
commit f3a5f13877
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ ssize_t zm_sendfile(int out_fd, int in_fd, off_t *offset, size_t size) {
return err;
#elif HAVE_SENDFILE7_SUPPORT
ssize_t err = sendfile(in_fd, out_fd, *offset, size, nullptr, &size, 0);
ssize_t err = sendfile(in_fd, out_fd, offset, size, nullptr, &size, 0);
if (err && errno != EAGAIN)
return -errno;
return size;