xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Oct 29 15:53:45 UTC 2018


 hw/xfree86/common/xf86platformBus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e50c85f4ebf559a3bac4817b41074c43d4691779
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Oct 26 17:47:30 2018 -0700

    Fix segfault on probing a non-PCI platform device on a system with PCI.
    
    Some Broadcom set-top-box boards have PCI busses, but the GPU is still
    probed through DT.  We would dereference a null busid here in that
    case.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index cef47da03..dadbac6c8 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -289,7 +289,7 @@ xf86platformProbe(void)
     for (i = 0; i < xf86_num_platform_devices; i++) {
         char *busid = xf86_platform_odev_attributes(i)->busid;
 
-        if (pci && (strncmp(busid, "pci:", 4) == 0)) {
+        if (pci && busid && (strncmp(busid, "pci:", 4) == 0)) {
             platform_find_pci_info(&xf86_platform_devices[i], busid);
         }
 


More information about the xorg-commit mailing list