diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2012-01-05 17:31:34 +0200 |
---|---|---|
committer | Yonit Halperin <yhalperi@redhat.com> | 2012-01-12 16:17:02 +0200 |
commit | 8b64b95c4339c145867e42f71b3206378bc7c83b (patch) | |
tree | 1c1ade429b293ce64fb75eae56831a61a4c4fd6b /server/inputs_channel.c | |
parent | a54f26d04e9a391977a8030d609b52e50243ba52 (diff) | |
download | spice-8b64b95c4339c145867e42f71b3206378bc7c83b.tar.gz spice-8b64b95c4339c145867e42f71b3206378bc7c83b.tar.xz spice-8b64b95c4339c145867e42f71b3206378bc7c83b.zip |
server: Limit the access to SpiceDataHeader of messages - only via red_channel.
Diffstat (limited to 'server/inputs_channel.c')
-rw-r--r-- | server/inputs_channel.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/server/inputs_channel.c b/server/inputs_channel.c index 0fa41629..4fe36b8e 100644 --- a/server/inputs_channel.c +++ b/server/inputs_channel.c @@ -168,18 +168,22 @@ const VDAgentMouseState *inputs_get_mouse_state(void) return &g_inputs_channel->mouse_state; } -static uint8_t *inputs_channel_alloc_msg_rcv_buf(RedChannelClient *rcc, SpiceDataHeader *msg_header) +static uint8_t *inputs_channel_alloc_msg_rcv_buf(RedChannelClient *rcc, + uint16_t type, + uint32_t size) { InputsChannel *inputs_channel = SPICE_CONTAINEROF(rcc->channel, InputsChannel, base); - if (msg_header->size > RECEIVE_BUF_SIZE) { + if (size > RECEIVE_BUF_SIZE) { red_printf("error: too large incoming message"); return NULL; } return inputs_channel->recv_buf; } -static void inputs_channel_release_msg_rcv_buf(RedChannelClient *rcc, SpiceDataHeader *msg_header, +static void inputs_channel_release_msg_rcv_buf(RedChannelClient *rcc, + uint16_t type, + uint32_t size, uint8_t *msg) { } |