From 50cbca799c1f9b010fabaa0dd4a387f29d140873 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Sun, 9 Aug 2020 12:39:07 +0100 Subject: fuse_send_data_iov(): correctly calculate total buffer size. Fixes: #538. --- lib/fuse_lowlevel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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; } -- cgit v1.2.3