[Spice-devel] [PATCH spice-streaming-agent] Use mnemonic to check for cursor limits

Uri Lublin uril at redhat.com
Mon Nov 13 16:37:59 UTC 2017


On 11/13/2017 04:58 PM, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>

Ack.

> ---
>   src/spice-streaming-agent.cpp | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
> index 973192b..11769ff 100644
> --- a/src/spice-streaming-agent.cpp
> +++ b/src/spice-streaming-agent.cpp
> @@ -289,7 +289,8 @@ static void usage(const char *progname)
>   
>   static void send_cursor(const XFixesCursorImage &image)
>   {
> -    if (image.width >= 1024 || image.height >= 1024)
> +    if (image.width >= STREAM_MSG_CURSOR_SET_MAX_WIDTH ||
> +        image.height >= STREAM_MSG_CURSOR_SET_MAX_HEIGHT)
>           return;
>   
>       size_t cursor_size =
> 



More information about the Spice-devel mailing list