diff --git a/0001-linux-Set-number-of-devices-to-0-in-case-of-error.patch b/0001-linux-Set-number-of-devices-to-0-in-case-of-error.patch deleted file mode 100644 index e2a3600..0000000 --- a/0001-linux-Set-number-of-devices-to-0-in-case-of-error.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 44f3dd08f99ba67e967980daaea2b800c68e2659 Mon Sep 17 00:00:00 2001 -From: Olivier Fourdan -Date: Wed, 24 Oct 2018 10:11:49 +0200 -Subject: [PATCH 1/3] 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 ---- - src/linux_sysfs.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c -index a8bc2e1..e74ad72 100644 ---- a/src/linux_sysfs.c -+++ b/src/linux_sysfs.c -@@ -264,6 +264,7 @@ populate_entries( struct pci_system * p ) - if (err) { - free(p->devices); - p->devices = NULL; -+ p->num_devices = 0; - } - - return err; --- -2.19.1 - diff --git a/libpciaccess-0.14.tar.bz2 b/libpciaccess-0.14.tar.bz2 deleted file mode 100644 index c0ec494..0000000 Binary files a/libpciaccess-0.14.tar.bz2 and /dev/null differ diff --git a/libpciaccess-0.16.tar.bz2 b/libpciaccess-0.16.tar.bz2 new file mode 100644 index 0000000..f6cc13d Binary files /dev/null and b/libpciaccess-0.16.tar.bz2 differ diff --git a/libpciaccess.spec b/libpciaccess.spec index 3b525e4..0d2daf1 100644 --- a/libpciaccess.spec +++ b/libpciaccess.spec @@ -1,6 +1,6 @@ Name: libpciaccess -Version: 0.14 -Release: 4 +Version: 0.16 +Release: 1 Summary: Generic PCI access library License: MIT URL: https://www.x.org/ @@ -10,7 +10,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Patch0: 0000-libpciaccess-rom-size.patch -Patch1: 0001-linux-Set-number-of-devices-to-0-in-case-of-error.patch BuildRequires: autoconf automake libtool pkgconfig git xorg-x11-util-macros Requires: hwdata @@ -55,6 +54,9 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la %changelog +* Wed Jul 15 2020 Zhiqiang Liu - 0.16-1 +- update to v0.16 version + * Wed Jul 1 2020 Wu Bo - 0.14-2.4 - rebuild package