Blame SOURCES/0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch

53db04
From e50c85f4ebf559a3bac4817b41074c43d4691779 Mon Sep 17 00:00:00 2001
53db04
From: Eric Anholt <eric@anholt.net>
53db04
Date: Fri, 26 Oct 2018 17:47:30 -0700
53db04
Subject: [PATCH xserver] Fix segfault on probing a non-PCI platform device on
53db04
 a system with PCI.
53db04
53db04
Some Broadcom set-top-box boards have PCI busses, but the GPU is still
53db04
probed through DT.  We would dereference a null busid here in that
53db04
case.
53db04
53db04
Signed-off-by: Eric Anholt <eric@anholt.net>
53db04
---
53db04
 hw/xfree86/common/xf86platformBus.c | 2 +-
53db04
 1 file changed, 1 insertion(+), 1 deletion(-)
53db04
53db04
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
53db04
index cef47da03d..dadbac6c8f 100644
53db04
--- a/hw/xfree86/common/xf86platformBus.c
53db04
+++ b/hw/xfree86/common/xf86platformBus.c
53db04
@@ -289,7 +289,7 @@ xf86platformProbe(void)
53db04
     for (i = 0; i < xf86_num_platform_devices; i++) {
53db04
         char *busid = xf86_platform_odev_attributes(i)->busid;
53db04
 
53db04
-        if (pci && (strncmp(busid, "pci:", 4) == 0)) {
53db04
+        if (pci && busid && (strncmp(busid, "pci:", 4) == 0)) {
53db04
             platform_find_pci_info(&xf86_platform_devices[i], busid);
53db04
         }
53db04
 
53db04
-- 
53db04
2.21.0
53db04