forked from enlightenment/efl
gl_drm: Check dmabuf attribute version before trusting attributes
We shouldn't do anything with a dmabuf structure until confirming the version matches the one we know.
This commit is contained in:
parent
2e0e017b87
commit
944a4065e8
|
@ -1197,10 +1197,11 @@ eng_image_native_set(void *engine, void *image, void *native)
|
||||||
if (!ns->data.wl_dmabuf.resource)
|
if (!ns->data.wl_dmabuf.resource)
|
||||||
{
|
{
|
||||||
struct dmabuf_attributes *attr;
|
struct dmabuf_attributes *attr;
|
||||||
void *v;
|
void *v = NULL;
|
||||||
|
|
||||||
attr = ns->data.wl_dmabuf.attr;
|
attr = ns->data.wl_dmabuf.attr;
|
||||||
v = gl_import_simple_dmabuf(ob->egl.disp, attr);
|
if (attr->version == EVAS_DMABUF_ATTRIBUTE_VERSION)
|
||||||
|
v = gl_import_simple_dmabuf(ob->egl.disp, attr);
|
||||||
if (!v) {
|
if (!v) {
|
||||||
ns->data.wl_dmabuf.attr = NULL;
|
ns->data.wl_dmabuf.attr = NULL;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue