From 8b64b95c4339c145867e42f71b3206378bc7c83b Mon Sep 17 00:00:00 2001 From: Yonit Halperin Date: Thu, 5 Jan 2012 17:31:34 +0200 Subject: server: Limit the access to SpiceDataHeader of messages - only via red_channel. --- server/inputs_channel.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'server/inputs_channel.c') 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) { } -- cgit