aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-01-17 10:21:18 +0100
committerSimon Ser <contact@emersion.fr>2021-01-17 12:08:40 +0100
commit879cadd34e1f74eb026d1e210a89f9aebd7fb99a (patch)
treeb16e2ee589a68bd6bf7f6c580702c1f33328dee8 /backend
parente537382991ea44a6b8dae41875c94d0455620e9a (diff)
backend/x11: add xcb_dri3_pixmap_from_buffers check for n_planes
Just in case.
Diffstat (limited to 'backend')
-rw-r--r--backend/x11/output.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/backend/x11/output.c b/backend/x11/output.c
index 63dfb110..fabe9e98 100644
--- a/backend/x11/output.c
+++ b/backend/x11/output.c
@@ -166,6 +166,10 @@ static struct wlr_x11_buffer *create_x11_buffer(struct wlr_x11_output *output,
xcb_pixmap_t pixmap = xcb_generate_id(x11->xcb);
if (x11->dri3_major_version > 1 || x11->dri3_minor_version >= 2) {
+ if (attrs.n_planes > 4) {
+ wlr_dmabuf_attributes_finish(&dup_attrs);
+ return NULL;
+ }
xcb_dri3_pixmap_from_buffers(x11->xcb, pixmap, output->win,
attrs.n_planes, attrs.width, attrs.height, attrs.stride[0],
attrs.offset[0], attrs.stride[1], attrs.offset[1], attrs.stride[2],