From 9abc0ee76f27707f63cd5155d9da8501e3755d7b Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Wed, 11 Mar 2015 17:09:48 -0400 Subject: [PATCH] ecore-drm: Return the index of the crtc from output_crtc_find Summary: Fix issue of invalid memory read from ecore_drm_output_create. We call ecore_drm_output_crtc_find to get the Index of the crtc to use, however prior to this commit the index was not being returned (the actual crtc was) @fix Signed-off-by: Chris Michael Reviewers: zmike Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2140 --- src/lib/ecore_drm/ecore_drm_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c index a86c4e6..16e1db3 100644 --- a/src/lib/ecore_drm/ecore_drm_output.c +++ b/src/lib/ecore_drm/ecore_drm_output.c @@ -204,7 +204,7 @@ _ecore_drm_output_crtc_find(Ecore_Drm_Device *dev, drmModeRes *res, drmModeConne if ((p & (1 << i)) && (!(dev->crtc_allocator & (1 << res->crtcs[i])))) { - return res->crtcs[i]; + return i; } } } -- 2.7.4