From: Kristian Høgsberg Date: Mon, 1 Oct 2012 15:19:10 +0000 (-0400) Subject: gbm: Reject buffers that are not wl_drm buffers in gbm_bo_import() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=017c6fb324194ba1c2e15fbee2f85a2fd8f140c4;p=mesa.git gbm: Reject buffers that are not wl_drm buffers in gbm_bo_import() Signed-off-by: Kristian Høgsberg --- diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index d8b1cc78892..70ea668c09f 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -375,6 +375,9 @@ gbm_dri_bo_import(struct gbm_device *gbm, { struct wl_drm_buffer *wb = (struct wl_drm_buffer *) buffer; + if (!wayland_buffer_is_drm(buffer)) + return NULL; + image = wb->driver_buffer; switch (wb->format) {