mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-07-23 11:44:14 +00:00
dmabuf: Don't crash clients by sending version inappropriate events
We need to make sure the client bound dmabuf with a high enough version to receive modifier events before sending them or the client will crash. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
cd052a6214
commit
bbc206e948
|
@ -483,6 +483,8 @@ bind_linux_dmabuf(struct wl_client *client,
|
|||
wl_resource_set_implementation(resource, &linux_dmabuf_implementation,
|
||||
compositor, NULL);
|
||||
|
||||
if (version < ZWP_LINUX_DMABUF_V1_MODIFIER_SINCE_VERSION)
|
||||
return;
|
||||
/*
|
||||
* Use EGL_EXT_image_dma_buf_import_modifiers to query and advertise
|
||||
* format/modifier codes.
|
||||
|
|
Loading…
Reference in a new issue