mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-26 06:59:52 -05:00
layer-shell: forbid set_size with values ≥INT32_MAX
(cherry picked from commit be1c48cbfb)
This commit is contained in:
parent
2c48c3837e
commit
82278edf3c
1 changed files with 6 additions and 0 deletions
|
|
@ -130,6 +130,12 @@ static void layer_surface_handle_set_size(struct wl_client *client,
|
|||
return;
|
||||
}
|
||||
|
||||
if (width > INT32_MAX || height > INT32_MAX) {
|
||||
wl_client_post_implementation_error(client,
|
||||
"zwlr_layer_surface_v1.set_size: width and height can't be greater than INT32_MAX");
|
||||
return;
|
||||
}
|
||||
|
||||
if (surface->current.desired_width == width
|
||||
&& surface->current.desired_height == height) {
|
||||
surface->pending.committed &= ~WLR_LAYER_SURFACE_V1_STATE_DESIRED_SIZE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue