diff --git a/usbutils-006-lsub-t_loop.patch b/usbutils-006-lsub-t_loop.patch new file mode 100644 index 0000000..733449c --- /dev/null +++ b/usbutils-006-lsub-t_loop.patch @@ -0,0 +1,34 @@ +diff --git a/lsusb-t.c b/lsusb-t.c +index 074dafb..3e29072 100644 +--- a/lsusb-t.c ++++ b/lsusb-t.c +@@ -210,8 +210,13 @@ static void read_sysfs_file_string(const char *d_name, const char *file, char *b + + static void append_dev_interface(struct usbinterface *i, struct usbinterface *new) + { +- while (i->next) ++ while (i->next) { ++ if (i == new) ++ return; + i = i->next; ++ } ++ if (i == new) ++ return; + i->next = new; + } + +@@ -230,8 +235,13 @@ static void append_businterface(unsigned int busnum, struct usbinterface *new) + if (b->busnum == busnum) { + i = b->first_interface; + if (i) { +- while (i->next) ++ while (i->next) { ++ if (i == new) ++ return; + i = i->next; ++ } ++ if (i == new) ++ return; + i->next = new; + } else + b->first_interface = new; diff --git a/usbutils.spec b/usbutils.spec index c86a917..ce6fe64 100644 --- a/usbutils.spec +++ b/usbutils.spec @@ -1,6 +1,6 @@ Name: usbutils Version: 006 -Release: 3%{?dist} +Release: 4%{?dist} Source: %{name}-%{version}.tar.gz URL: http://www.linux-usb.org/ License: GPLv2+ @@ -14,6 +14,7 @@ Conflicts: hotplug < 3:2002_01_14-2 #Path to usb.ids in lsusb.py should be with /hwdata/ Patch0: usbutils-006-hwdata.patch +Patch1: usbutils-006-lsub-t_loop.patch %description This package contains utilities for inspecting devices connected to a @@ -22,6 +23,7 @@ USB bus. %prep %setup -q %patch0 -p1 +%patch1 -p1 ./autogen.sh %build @@ -43,6 +45,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" rm -rf $RPM_BUILD_ROOT %changelog +* Tue Feb 26 2013 Lukáš Nykrýn - 006-4 +- lsusb-t: make sure that interfaces are added to lists only once (#914929) + * Fri Feb 15 2013 Fedora Release Engineering - 006-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild