mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-27 07:29:32 +00:00
server/inputs: return NULL on alloc_buf request for too large message
This commit is contained in:
parent
380b5e9dd7
commit
96da0a4819
@ -157,6 +157,10 @@ static uint8_t *inputs_channel_alloc_msg_rcv_buf(RedChannel *channel, SpiceDataH
|
||||
{
|
||||
InputsChannel *inputs_channel = SPICE_CONTAINEROF(channel, InputsChannel, base);
|
||||
|
||||
if (msg_header->size > RECEIVE_BUF_SIZE) {
|
||||
red_printf("error: too large incoming message");
|
||||
return NULL;
|
||||
}
|
||||
return inputs_channel->recv_buf;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user