rpms/libusb/F-12 libusb-0.1.12-invalid-read.patch, NONE, 1.1 libusb.spec, 1.47, 1.48

jvcelak jvcelak at fedoraproject.org
Wed Jun 23 14:25:27 UTC 2010


Author: jvcelak

Update of /cvs/pkgs/rpms/libusb/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv25956

Modified Files:
	libusb.spec 
Added Files:
	libusb-0.1.12-invalid-read.patch 
Log Message:
fixes invalid read causing segfault (#565904)



libusb-0.1.12-invalid-read.patch:
 descriptors.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

--- NEW FILE libusb-0.1.12-invalid-read.patch ---
diff -ru libusb-0.1.12.orig/descriptors.c libusb-0.1.12/descriptors.c
--- libusb-0.1.12.orig/descriptors.c	2006-03-04 02:52:46.000000000 +0000
+++ libusb-0.1.12/descriptors.c	2010-02-16 17:31:42.000000000 +0000
@@ -235,11 +235,12 @@
     }
 
     /* Did we hit an unexpected descriptor? */
-    usb_parse_descriptor(buffer, "bb", &header);
-    if ((size >= DESC_HEADER_LENGTH) &&
-        ((header.bDescriptorType == USB_DT_CONFIG) ||
-        (header.bDescriptorType == USB_DT_DEVICE)))
-      return parsed;
+    if (size >= DESC_HEADER_LENGTH) {
+      usb_parse_descriptor(buffer, "bb", &header);
+      if (((header.bDescriptorType == USB_DT_CONFIG) ||
+          (header.bDescriptorType == USB_DT_DEVICE)))
+        return parsed;
+    }
 
     if (ifp->bNumEndpoints > USB_MAXENDPOINTS) {
       if (usb_debug >= 1)


Index: libusb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libusb/F-12/libusb.spec,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -p -r1.47 -r1.48
--- libusb.spec	25 Jul 2009 08:50:08 -0000	1.47
+++ libusb.spec	23 Jun 2010 14:25:27 -0000	1.48
@@ -1,13 +1,14 @@
 Summary: A library which allows userspace access to USB devices
 Name: libusb
 Version: 0.1.12
-Release: 22%{?dist}
+Release: 23%{?dist}
 Source0: http://prdownloads.sourceforge.net/libusb/%{name}-%{version}.tar.gz
 Patch0: libusb-0.1.12-libusbconfig.patch
 Patch1: libusb-0.1.12-memset.patch
 Patch2: libusb-0.1.12-openat.patch
 Patch3: libusb-0.1.12-wakeups.patch
 Patch4: libusb-0.1.12-concurrency-timeout.patch
+Patch5: libusb-0.1.12-invalid-read.patch
 License: LGPLv2+
 Group: System Environment/Libraries
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -44,6 +45,7 @@ This package contains static libraries t
 %patch2 -p1 -b .openat
 #%patch3 -p0 -b .wakeups
 #%patch4 -p1 -b .concurrency-timeout
+%patch5 -p1 -b .invalid-read
 
 %build
 autoconf
@@ -83,6 +85,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/*.a
 
 %changelog
+* Wed Jun 23 2010 Jan Vcelak <jvcelak at redhat.com> 0.1.12-23
+- fixes invalid read causing segfault (#565904)
+
 * Sat Jul 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.1.12-22
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 



More information about the scm-commits mailing list