xserver: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Dec 11 18:36:40 UTC 2018
hw/xfree86/drivers/modesetting/drmmode_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 48b1af2718ab81c66f565438553415c05f1faa5c
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Mon Dec 10 23:34:11 2018 -0500
modesetting: fix conn_id termination and potential overrun by 1 byte
Noticed when porting this logic to xf86-video-nouveau, and valgrind
complained about conditional jump based on uninitialized data.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.com>
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index e07555d34..cb48aa46b 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -2840,7 +2840,7 @@ static int parse_path_blob(drmModePropertyBlobPtr path_blob, int *conn_base_id,
if (len + 1> 5)
return -1;
memcpy(conn_id, blob_data + 4, len);
- conn_id[len + 1] = '\0';
+ conn_id[len] = '\0';
id = strtoul(conn_id, NULL, 10);
*conn_base_id = id;
More information about the xorg-commit
mailing list