xserver-multidpi/dri3
Emil Velikov e2f45002fc dri3: check for ::get_drawable_modifiers failure
Currently if the function fails, we'll fall into two false assumptions:
 - the the count is zero
 - that the storage pointer is safe for free()

I've just fixed the former (in glamor + xwayland) and have no
plans on adding yet another workaround for the latter.

Simply zero both variables. Regardless if the implementation is missing
the callback or it foobars with output variables (normally a bad idea).

Bonus points - this fixes a bug where we feed garbage to free() further
down ;-)

Fixes: cef12efc15 ("glamor: Implement GetSupportedModifiers")
Cc: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Cc: Daniel Stone <daniels@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2018-04-10 15:42:40 -04:00
..
dri3_priv.h dri3: annotate fds/strides/offsets arrays as const 2018-04-10 15:42:40 -04:00
dri3_request.c dri3: Use single-FD screen call for single-FD request 2018-04-04 13:46:57 -04:00
dri3_screen.c dri3: check for ::get_drawable_modifiers failure 2018-04-10 15:42:40 -04:00
dri3.c dri3: annotate the dri3_screen_info data as const 2018-04-10 15:42:23 -04:00
dri3.h dri3: annotate fds/strides/offsets arrays as const 2018-04-10 15:42:40 -04:00
Makefile.am dri3: Add DRI3 extension 2013-10-31 16:58:30 -07:00
meson.build meson: Distribute more SDK headers 2018-04-02 13:42:08 -04:00