rpms/pciutils/devel pciutils-dir-d.patch, 1.1, 1.2 pciutils.spec, 1.53, 1.54

Harald Hoyer (harald) fedora-extras-commits at redhat.com
Mon Jan 21 13:31:32 UTC 2008


Author: harald

Update of /cvs/pkgs/rpms/pciutils/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4501

Modified Files:
	pciutils-dir-d.patch pciutils.spec 
Log Message:
* Mon Jan 21 2008 Harald Hoyer <harald at redhat.com> 2.2.9-4
- fixed segfault, if subdir does not exists


pciutils-dir-d.patch:

Index: pciutils-dir-d.patch
===================================================================
RCS file: /cvs/pkgs/rpms/pciutils/devel/pciutils-dir-d.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- pciutils-dir-d.patch	18 Jan 2008 08:56:39 -0000	1.1
+++ pciutils-dir-d.patch	21 Jan 2008 13:31:25 -0000	1.2
@@ -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 @@
  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 @@
    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 @@
 +  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)


Index: pciutils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/pciutils/devel/pciutils.spec,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- pciutils.spec	18 Jan 2008 08:57:51 -0000	1.53
+++ pciutils.spec	21 Jan 2008 13:31:25 -0000	1.54
@@ -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 @@
 rm -rf $RPM_BUILD_ROOT
 
 %changelog
+* Mon Jan 21 2008 Harald Hoyer <harald at redhat.com> 2.2.9-4
+- fixed segfault, if subdir does not exists
+
 * Fri Jan 18 2008 Harald Hoyer <harald at 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




More information about the fedora-extras-commits mailing list