From 73dfc4fba298745e159b94cc294876291622c418 Mon Sep 17 00:00:00 2001 From: Andreas Baierl Date: Mon, 11 Mar 2019 16:04:08 +0100 Subject: [PATCH libdrm] 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 --- xf86drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xf86drm.c b/xf86drm.c index cbae3e28..5f79e01d 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -3629,7 +3629,7 @@ static int drmParseOFDeviceInfo(int maj, int min, char ***compatible) free(value); } - *compatible[i] = tmp_name; + (*compatible)[i] = tmp_name; } return 0; -- 2.20.1