xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 24 09:24:59 UTC 2021


 hw/xfree86/common/xf86Bus.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d66b7ec12986efd4f32fcc84cdaacbd04ec98ccb
Author: Łukasz Spintzyk <lukasz.spintzyk at synaptics.com>
Date:   Wed Jun 23 15:26:23 2021 +0200

    xfree86: Fix out of array bound access to xf86Entities
    
    Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk at synaptics.com>

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;
 }
 
 /*


More information about the xorg-commit mailing list