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

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