Skip to content

xfree86: Fix potential NULL references to pci_device in platform probe code

This PR fixes several places where a NULL reference and subsequent crash is possible. These are the only cases where xf86_platform_device's pdev member is used without checking for NULL beforehand.

We already have two crash reports in #993 (closed) and #1044 (closed) so we know that it's a possibility.

As to how that exactly happens one of the possibilities is in xf86platformProbe which does not really ensure that pdev are actually filled in. If e.g. platform_find_pci_info fails to match PCI path, then that member will be left as NULL.

Fixes #1044 (closed).

The root cause in #993 (closed) is different and is being fixed in !648 (merged).

Edited by Povilas Kanapickas

Merge request reports

Loading