[Spice-devel] [PATCH spice-server] common-graphics-channel: Avoid closing server if client send huge messages

Frediano Ziglio fziglio at redhat.com
Mon Jun 3 07:39:30 UTC 2019


The Cursor/DisplayChannel is not expecting large messages (which are
protocol violations).

This fixes https://gitlab.freedesktop.org/spice/spice-server/issues/11.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/common-graphics-channel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/common-graphics-channel.c b/server/common-graphics-channel.c
index 92349ce4d..cea805d09 100644
--- a/server/common-graphics-channel.c
+++ b/server/common-graphics-channel.c
@@ -53,7 +53,7 @@ static uint8_t *common_alloc_recv_buf(RedChannelClient *rcc, uint16_t type, uint
     }
 
     if (size > CHANNEL_RECEIVE_BUF_SIZE) {
-        spice_critical("unexpected message size %u (max is %d)", size, CHANNEL_RECEIVE_BUF_SIZE);
+        spice_warning("unexpected message size %u (max is %d)", size, CHANNEL_RECEIVE_BUF_SIZE);
         return NULL;
     }
     return common->priv->recv_buf;
-- 
2.20.1



More information about the Spice-devel mailing list