mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 22:48:19 +00:00
display channel: Don't let client set too many surfaces
Limit the n_surfaces argument to avoid overflowing the surfaces array. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
090fbe5eeb
commit
beec1b4175
@ -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);
|
||||
display->priv->renderer = RED_RENDERER_INVALID;
|
||||
|
||||
ring_init(&display->priv->current_list);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user