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

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