Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
spice-vdagent.17026
vdagentd-do-not-allow-to-use-an-already-used-fi...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File vdagentd-do-not-allow-to-use-an-already-used-file-xf.patch of Package spice-vdagent.17026
From b1c3e64b0be00a0bd2ec977f47bceb9bb269822a Mon Sep 17 00:00:00 2001 From: Uri Lublin <uril@redhat.com> Date: Sun, 11 Oct 2020 20:59:17 +0300 Subject: [PATCH 20/20] vdagentd: do not allow to use an already used file-xfer id Git-commit: 36bc5b2988f0602cef865bc2291b87a1f3a6267c References: bsc#1173749 Signed-off-by: Uri Lublin <uril@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com> Signed-off-by: Bruce Rogers <brogers@suse.com> --- src/vdagentd/vdagentd.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vdagentd/vdagentd.c b/src/vdagentd/vdagentd.c index 5553e6f..4d394dd 100644 --- a/src/vdagentd/vdagentd.c +++ b/src/vdagentd/vdagentd.c @@ -382,6 +382,13 @@ static void do_client_file_xfer(struct vdagent_virtio_port *vport, "Cancelling client file-xfer request %u", s->id, VD_AGENT_FILE_XFER_STATUS_ERROR, (void*) &error, detail_size); return; + } else if (g_hash_table_lookup(active_xfers, GUINT_TO_POINTER(s->id)) != NULL) { + // id is already used -- client is confused + send_file_xfer_status(vport, + "File transfer ID is already used. " + "Cancelling client file-xfer request %u", + s->id, VD_AGENT_FILE_XFER_STATUS_ERROR, NULL, 0); + return; } msg_type = VDAGENTD_FILE_XFER_START; id = s->id; -- 2.29.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor