aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNikolaus Rath <Nikolaus@rath.org>2020-08-09 12:39:07 +0100
committerNikolaus Rath <Nikolaus@rath.org>2020-08-09 12:42:09 +0100
commit50cbca799c1f9b010fabaa0dd4a387f29d140873 (patch)
tree9717e36c4ce1b85b6879fd707363950b40b1e259 /lib
parent7b3e3899157566875280a8b860eb5ad5c73eadc1 (diff)
downloadlibfuse-50cbca799c1f9b010fabaa0dd4a387f29d140873.tar.gz
fuse_send_data_iov(): correctly calculate total buffer size.
Fixes: #538.
Diffstat (limited to 'lib')
-rw-r--r--lib/fuse_lowlevel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index 7b72ee0..f4e6138 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -662,7 +662,7 @@ static int fuse_send_data_iov(struct fuse_session *se, struct fuse_chan *ch,
total_buf_size = 0;
for (idx = buf->idx; idx < buf->count; idx++) {
- total_buf_size = buf->buf[idx].size;
+ total_buf_size += buf->buf[idx].size;
if (idx == buf->idx)
total_buf_size -= buf->off;
}