summaryrefslogtreecommitdiffstats
path: root/tools/virtiofsd/buffer.c
diff options
context:
space:
mode:
authorPeter Maydell2020-11-12 21:13:01 +0100
committerPeter Maydell2020-11-12 21:13:01 +0100
commit4cfac0152e798f9c60472706c0441501da13183c (patch)
treeaa52af2f3606e4a6f310f660cc11e899eafd79ce /tools/virtiofsd/buffer.c
parentMerge remote-tracking branch 'remotes/mcayland/tags/qemu-macppc-20201112' int... (diff)
parentvirtiofsd: check whether strdup lo.source return NULL in main func (diff)
downloadqemu-4cfac0152e798f9c60472706c0441501da13183c.tar.gz
qemu-4cfac0152e798f9c60472706c0441501da13183c.tar.xz
qemu-4cfac0152e798f9c60472706c0441501da13183c.zip
Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20201112a' into staging
Migration & virtiofs fixes for 5.2 A bunch of small fixes. # gpg: Signature made Thu 12 Nov 2020 18:34:41 GMT # gpg: using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7 # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" [full] # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7 * remotes/dgilbert/tags/pull-migration-20201112a: virtiofsd: check whether strdup lo.source return NULL in main func virtiofsd: check whether lo_map_reserve returns NULL in, main func tools/virtiofsd/buffer.c: check whether buf is NULL in fuse_bufvec_advance func virtiofsd: Announce submounts even without statx() migration: handle CANCELLING state in migration_completion() multifd/tls: fix memoryleak of the QIOChannelSocket object when cancelling migration migration/dirtyrate: simplify includes in dirtyrate.c migration: fix uninitialized variable warning in migrate_send_rp_req_pages() migration/multifd: fix hangup with TLS-Multifd due to blocking handshake ACPI: Avoid infinite recursion when dump-vmstate migration/ram: Fix hexadecimal format string specifier Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tools/virtiofsd/buffer.c')
-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 27c1377f22..bdc608c221 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) {