diff options
author | Kristian Høgsberg <[email protected]> | 2012-10-01 11:19:10 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2012-10-15 22:33:04 -0400 |
commit | 017c6fb324194ba1c2e15fbee2f85a2fd8f140c4 (patch) | |
tree | ba807b66ac4817f52eac6ae027e38d26753e32fa | |
parent | 0978707917e68fdb2da4035a810480622fed5410 (diff) |
gbm: Reject buffers that are not wl_drm buffers in gbm_bo_import()
Signed-off-by: Kristian Høgsberg <[email protected]>
-rw-r--r-- | src/gbm/backends/dri/gbm_dri.c | 3 |
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) { |