From d66b7ec12986efd4f32fcc84cdaacbd04ec98ccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Spintzyk?= Date: Wed, 23 Jun 2021 15:26:23 +0200 Subject: [PATCH] xfree86: Fix out of array bound access to xf86Entities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ɓukasz Spintzyk --- hw/xfree86/common/xf86Bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c index 272ad4cbe..8a7fc4327 100644 --- a/hw/xfree86/common/xf86Bus.c +++ b/hw/xfree86/common/xf86Bus.c @@ -528,8 +528,8 @@ xf86GetDevFromEntity(int entityIndex, int instance) for (i = 0; i < xf86Entities[entityIndex]->numInstances; i++) if (xf86Entities[entityIndex]->devices[i]->screen == instance) - break; - return xf86Entities[entityIndex]->devices[i]; + return xf86Entities[entityIndex]->devices[i]; + return NULL; } /*