diff --git a/libusb-0.1.12-memset.patch b/libusb-0.1.12-memset.patch new file mode 100644 index 0000000..798e0b1 --- /dev/null +++ b/libusb-0.1.12-memset.patch @@ -0,0 +1,10 @@ +--- libusb-0.1.12/usb.c.memset 2006-03-04 03:52:46.000000000 +0100 ++++ libusb-0.1.12/usb.c 2007-08-01 12:32:17.000000000 +0200 +@@ -232,6 +232,7 @@ int usb_get_string_simple(usb_dev_handle + char tbuf[255]; /* Some devices choke on size > 255 */ + int ret, langid, si, di; + ++ memset(tbuf, 0, sizeof(tbuf)); + /* + * Asking for the zero'th index is special - it returns a string + * descriptor that contains all the language IDs supported by the diff --git a/libusb.spec b/libusb.spec index a598b84..d817818 100644 --- a/libusb.spec +++ b/libusb.spec @@ -1,9 +1,10 @@ Summary: A library which allows userspace access to USB devices Name: libusb Version: 0.1.12 -Release: 7%{?dist} +Release: 8%{?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 License: LGPL Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -37,6 +38,7 @@ This package contains static libraries to develop applications that use libusb. %prep %setup -q %patch0 -p1 -b .libusbconfig +%patch1 -p1 -b .memset %build %configure @@ -74,6 +76,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/*.a %changelog +* Wed Aug 1 2007 Jindrich Novy 0.1.12-8 +- don't use uninitialized buffers on stack (#250274) + * Tue Feb 08 2007 Jindrich Novy 0.1.12-7 - merge review spec fixes (#226053) - create -static subpackage to ship static libs separately