aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/virtiofsd/buffer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/virtiofsd/buffer.c b/tools/virtiofsd/buffer.c
index 27c1377..bdc608c 100644
--- a/tools/virtiofsd/buffer.c
+++ b/tools/virtiofsd/buffer.c
@@ -246,6 +246,10 @@ static int fuse_bufvec_advance(struct fuse_bufvec *bufv, size_t len)
{
const struct fuse_buf *buf = fuse_bufvec_current(bufv);
+ if (!buf) {
+ return 0;
+ }
+
bufv->off += len;
assert(bufv->off <= buf->size);
if (bufv->off == buf->size) {