libpciaccess: Changes to 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Oct 24 15:41:09 UTC 2018
src/linux_sysfs.c | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 44f3dd08f99ba67e967980daaea2b800c68e2659
Author: Olivier Fourdan <ofourdan at redhat.com>
Date: Wed Oct 24 10:11:49 2018 +0200
linux: Set number of devices to 0 in case of error
pci_sys is a global variable which is populated on init, and in case of
error reading sysfs on Linux, the devices are NULL, but the number of
devices is left unchanged.
As a result, we may crash in `pci_device_next()` which relies on the
number of devices.
To fix the issue, simply reset the number of devices to zero in case of
error so we don't try to access indices of a NULL array later on.
Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
More information about the xorg-commit
mailing list