Re: [PATCH spice-server] Avoid client to set too much surfaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, Oct 20, 2016 at 12:36:50PM +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/display-channel.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/server/display-channel.c b/server/display-channel.c
> index 69edd35..0b8d6b5 100644
> --- a/server/display-channel.c
> +++ b/server/display-channel.c
> @@ -1946,7 +1946,7 @@ DisplayChannel* display_channel_new(RedsState *reds,
>  #endif
>      image_encoder_shared_init(&display->priv->encoder_shared_data);
>
> -    display->priv->n_surfaces = n_surfaces;
> +    display->priv->n_surfaces = MIN(n_surfaces, NUM_SURFACES);

Maybe you can move the
spice_warn_if_fail(init_info.n_surfaces <= NUM_SURFACES); on
red-worker.c here too?

Either way, looks good
Reviewed-by: Victor Toso <victortoso@xxxxxxxxxx>

>      display->priv->renderer = RED_RENDERER_INVALID;
>  
>      ring_init(&display->priv->current_list);
> -- 
> 2.7.4
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]