packages: pciutils/pciutils.spec, pciutils/pciutils-pci_init-error.patch (N...

baggins baggins at pld-linux.org
Sun Aug 7 22:07:25 CEST 2011


Author: baggins                      Date: Sun Aug  7 20:07:25 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 5
- as error func can be redefined to something that does not exit(1),
  return from pci_init on errors to avoid referencing null pointers

---- Files affected:
packages/pciutils:
   pciutils.spec (1.121 -> 1.122) , pciutils-pci_init-error.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/pciutils/pciutils.spec
diff -u packages/pciutils/pciutils.spec:1.121 packages/pciutils/pciutils.spec:1.122
--- packages/pciutils/pciutils.spec:1.121	Tue Jun  7 12:56:31 2011
+++ packages/pciutils/pciutils.spec	Sun Aug  7 22:07:20 2011
@@ -18,7 +18,7 @@
 Summary(zh_CN.UTF-8):	PCI 总线相关的工具。
 Name:		pciutils
 Version:	3.1.7
-Release:	4
+Release:	5
 License:	GPL v2+
 Group:		Applications/System
 Source0:	ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/%{name}-%{version}.tar.gz
@@ -29,6 +29,7 @@
 Patch0:		%{name}-pci_h.patch
 Patch1:		%{name}-pcimodules.patch
 Patch2:		%{name}-nowhich.patch
+Patch3:		%{name}-pci_init-error.patch
 URL:		http://mj.ucw.cz/pciutils.html
 BuildRequires:	zlib-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -253,6 +254,7 @@
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 # paranoid check whether pci.ids in _sourcedir isn't too old
 if [ $(wc -l < %{SOURCE2}) -lt $(wc -l < pci.ids) ] ; then
@@ -355,6 +357,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.122  2011/08/07 20:07:20  baggins
+- rel 5
+- as error func can be redefined to something that does not exit(1),
+  return from pci_init on errors to avoid referencing null pointers
+
 Revision 1.121  2011/06/07 10:56:31  arekm
 - release 4
 

================================================================
Index: packages/pciutils/pciutils-pci_init-error.patch
diff -u /dev/null packages/pciutils/pciutils-pci_init-error.patch:1.1
--- /dev/null	Sun Aug  7 22:07:25 2011
+++ packages/pciutils/pciutils-pci_init-error.patch	Sun Aug  7 22:07:20 2011
@@ -0,0 +1,26 @@
+--- pciutils-3.1.7/lib/init.c~	2008-11-11 00:11:51.000000000 +0100
++++ pciutils-3.1.7/lib/init.c	2011-08-07 22:05:05.968913892 +0200
+@@ -178,8 +178,10 @@
+ 
+   if (a->method)
+     {
+-      if (a->method >= PCI_ACCESS_MAX || !pci_methods[a->method])
++      if (a->method >= PCI_ACCESS_MAX || !pci_methods[a->method]) {
+ 	a->error("This access method is not supported.");
++	return;
++      }
+       a->methods = pci_methods[a->method];
+     }
+   else
+@@ -198,8 +200,10 @@
+ 	      }
+ 	    a->debug("...No.\n");
+ 	  }
+-      if (!a->methods)
++      if (!a->methods) {
+ 	a->error("Cannot find any working access method.");
++	return;
++      }
+     }
+   a->debug("Decided to use %s\n", a->methods->name);
+   a->methods->init(a);
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/pciutils/pciutils.spec?r1=1.121&r2=1.122&f=u



More information about the pld-cvs-commit mailing list