summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk/channel-main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index db0e68b..8215338 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -525,7 +525,7 @@ static void agent_clipboard_notify(SpiceMainChannel *channel,
msgsize = sizeof(VDAgentClipboard) + size;
cb = spice_malloc0(msgsize);
cb->type = type;
- memcpy(cb->data, data, msgsize);
+ memcpy(cb->data, data, size);
agent_msg_send(channel, VD_AGENT_CLIPBOARD, msgsize, cb);
free(cb);