aboutsummaryrefslogtreecommitdiffstats
path: root/src/gbm/backends
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2012-10-01 11:19:10 -0400
committerKristian Høgsberg <[email protected]>2012-10-15 22:33:04 -0400
commit017c6fb324194ba1c2e15fbee2f85a2fd8f140c4 (patch)
treeba807b66ac4817f52eac6ae027e38d26753e32fa /src/gbm/backends
parent0978707917e68fdb2da4035a810480622fed5410 (diff)
gbm: Reject buffers that are not wl_drm buffers in gbm_bo_import()
Signed-off-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/gbm/backends')
-rw-r--r--src/gbm/backends/dri/gbm_dri.c3
1 files changed, 3 insertions, 0 deletions
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) {