summary refs log tree commit diff stats
path: root/hw/i386/kvm/xen_xenstore.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/i386/kvm/xen_xenstore.c')
-rw-r--r--hw/i386/kvm/xen_xenstore.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/i386/kvm/xen_xenstore.c b/hw/i386/kvm/xen_xenstore.c
index 5969105667..17802aa33d 100644
--- a/hw/i386/kvm/xen_xenstore.c
+++ b/hw/i386/kvm/xen_xenstore.c
@@ -532,6 +532,10 @@ static void xs_read(XenXenstoreState *s, unsigned int req_id,
         return;
     }
 
+    if (!len) {
+        return;
+    }
+
     memcpy(&rsp_data[rsp->len], data->data, len);
     rsp->len += len;
 }