xserver/hw
Olivier Fourdan 079c5ccbcd xwayland/shm: Avoid integer overflow on large pixmaps
Xwayland's xwl_shm_create_pixmap() computes the size of the shared
memory pool to create using a size_t, yet the Wayland protocol uses an
integer for that size.

If the pool size becomes larger than INT32_MAX, we end up asking Wayland
to create a shared memory pool of negative size which in turn will raise
a protocol error which terminates the Wayland connection, and therefore
Xwayland.

Avoid that issue early by return a NULL pixmap in that case, which will
trigger a BadAlloc error, but leave Xwayland alive.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2021-10-05 10:00:02 +00:00
..
kdrive glamor: Require EGL_KHR_no_config_context 2021-09-15 19:14:23 +00:00
vfb mi: List extensions in usage message 2021-01-29 12:52:09 +00:00
xfree86 Revert "modesetting: Only use GAMMA_LUT if its size is 1024" 2021-09-27 09:44:48 +00:00
xnest mi: List extensions in usage message 2021-01-29 12:52:09 +00:00
xquartz French text in Preferences Pane Review 2021-04-07 16:19:24 -07:00
xwayland xwayland/shm: Avoid integer overflow on large pixmaps 2021-10-05 10:00:02 +00:00
xwin mi: List extensions in usage message 2021-01-29 12:52:09 +00:00
Makefile.am Drop DMX DDX 2021-09-07 09:34:31 +00:00
meson.build Drop DMX DDX 2021-09-07 09:34:31 +00:00