- fixed segfault, if subdir does not exists
This commit is contained in:
parent
a9d8b8ab41
commit
91b1c681c7
@ -1,6 +1,6 @@
|
||||
diff -up pciutils-2.2.9/lib/pci.h.dird pciutils-2.2.9/lib/pci.h
|
||||
--- pciutils-2.2.9/lib/pci.h.dird 2006-09-09 14:46:06.000000000 +0200
|
||||
+++ pciutils-2.2.9/lib/pci.h 2008-01-18 09:51:03.000000000 +0100
|
||||
+++ pciutils-2.2.9/lib/pci.h 2008-01-21 14:27:27.000000000 +0100
|
||||
@@ -162,6 +162,7 @@ char *pci_lookup_name(struct pci_access
|
||||
int pci_load_name_list(struct pci_access *a); /* Called automatically by pci_lookup_*() when needed; returns success */
|
||||
void pci_free_name_list(struct pci_access *a); /* Called automatically by pci_cleanup() */
|
||||
@ -10,8 +10,8 @@ diff -up pciutils-2.2.9/lib/pci.h.dird pciutils-2.2.9/lib/pci.h
|
||||
enum pci_lookup_mode {
|
||||
PCI_LOOKUP_VENDOR = 1, /* Vendor name (args: vendorID) */
|
||||
diff -up pciutils-2.2.9/lib/names.c.dird pciutils-2.2.9/lib/names.c
|
||||
--- pciutils-2.2.9/lib/names.c.dird 2008-01-18 09:51:03.000000000 +0100
|
||||
+++ pciutils-2.2.9/lib/names.c 2008-01-18 09:54:28.000000000 +0100
|
||||
--- pciutils-2.2.9/lib/names.c.dird 2008-01-21 14:27:27.000000000 +0100
|
||||
+++ pciutils-2.2.9/lib/names.c 2008-01-21 14:29:55.000000000 +0100
|
||||
@@ -11,6 +11,8 @@
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
@ -58,7 +58,7 @@ diff -up pciutils-2.2.9/lib/names.c.dird pciutils-2.2.9/lib/names.c
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -548,3 +550,46 @@ void pci_set_name_list_path(struct pci_a
|
||||
@@ -548,3 +550,49 @@ void pci_set_name_list_path(struct pci_a
|
||||
a->id_file_name = name;
|
||||
a->free_id_name = to_be_freed;
|
||||
}
|
||||
@ -77,6 +77,9 @@ diff -up pciutils-2.2.9/lib/names.c.dird pciutils-2.2.9/lib/names.c
|
||||
+ strncat(new_id_path, ".d/", PATH_MAX - strnlen(new_id_path, PATH_MAX));
|
||||
+ /* printf("new_id_path is %s\n", new_id_path); */
|
||||
+ pci_ids_dir = opendir(new_id_path);
|
||||
+ if (pci_ids_dir == NULL)
|
||||
+ return 0;
|
||||
+
|
||||
+ do
|
||||
+ {
|
||||
+ if ((dp = readdir(pci_ids_dir)) != NULL)
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: pciutils
|
||||
Version: 2.2.9
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Source: ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/%{name}-%{version}.tar.gz
|
||||
Patch0: pciutils-strip.patch
|
||||
Patch1: pciutils-2.2.4-buf.patch
|
||||
@ -78,6 +78,9 @@ install -p lib/libpci.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%changelog
|
||||
* Mon Jan 21 2008 Harald Hoyer <harald@redhat.com> 2.2.9-4
|
||||
- fixed segfault, if subdir does not exists
|
||||
|
||||
* Fri Jan 18 2008 Harald Hoyer <harald@redhat.com> 2.2.9-3
|
||||
- removed static library, preserve timestamps on install (rhbz#226236)
|
||||
- added modified patch from Michael E. Brown @ Dell, to also
|
||||
|
Loading…
Reference in New Issue
Block a user