drm: Branch 'master'
[email protected] (GitLab Mirror) Tue, 12 Mar 2019 12:50:53 +0000 (UTC)
| Newsgroups | gmane.comp.video.dri.patches |
|---|---|
| Message-ID | <[email protected]> |
xf86drm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 4735ca71af9f741e2438104d543dc3c5a8107f35 Author: Andreas Baierl <[email protected]> Date: Mon Mar 11 16:04:08 2019 +0100 xf86drm: Fix segmentation fault while parsing device info This fixes a bug, which was introduced with commit ee798b98 "xf85drm: de-duplicate drmParse{Platform.Host1x}{Bus,Device}Info". where accessing *compatible[i] with i>0 results in a segfault. Signed-off-by: Andreas Baierl <[email protected]> Fixes: ee798b98479709acdd8d "xf85drm: de-duplicate drmParse{Platform.Host1x}{Bus,Device}Info" Reviewed-by: Eric Engestrom <[email protected]> [Eric: add the same fix to the free() below] Signed-off-by: Eric Engestrom <[email protected]> diff --git a/xf86drm.c b/xf86drm.c index cbae3e28..18ad7c58 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -3629,14 +3629,14 @@ static int drmParseOFDeviceInfo(int maj, int min, char ***compatible) free(value); } - *compatible[i] = tmp_name; + (*compatible)[i] = tmp_name; } return 0; free: while (i--) - free(*compatible[i]); + free((*compatible)[i]); free(*compatible); return err; --