From 3ce07dcba350a4ac1f27a7c59a69396fdd5fcd2af2fcd100ba1210140a0cd926 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 25 Oct 2007 23:49:39 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nut?expand=0&rev=7 --- nut-hidparser.diff | 11 +++++++++++ nut.changes | 5 +++++ nut.spec | 6 +++++- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 nut-hidparser.diff diff --git a/nut-hidparser.diff b/nut-hidparser.diff new file mode 100644 index 0000000..f463038 --- /dev/null +++ b/nut-hidparser.diff @@ -0,0 +1,11 @@ +--- tags/v2.2.0/drivers/hidparser.c (revision 1148) ++++ tags/v2.2.0/drivers/hidparser.c (working copy) +@@ -618,7 +618,7 @@ + /* done scanning report descriptor; now calculate derived data */ + + /* make a list of reports and their lengths */ +- memset(pDesc->replen, 0, 256); ++ memset(pDesc->replen, 0, 256 * sizeof(*pDesc->replen)); + for (i=0; initems; i++) { + id = item[i].ReportID; + diff --git a/nut.changes b/nut.changes index 18a1afc..4a9472e 100644 --- a/nut.changes +++ b/nut.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Oct 25 18:35:53 CEST 2007 - sbrabec@suse.cz + +- Fixed use of uninitialized memory (#331749#c13). + ------------------------------------------------------------------- Tue Oct 23 17:46:28 CEST 2007 - sbrabec@suse.cz diff --git a/nut.spec b/nut.spec index f59c3f0..87066fc 100644 --- a/nut.spec +++ b/nut.spec @@ -22,7 +22,7 @@ Conflicts: apcupsd AutoReqProv: on Summary: UPS Monitoring Software Version: 2.2.0 -Release: 30 +Release: 33 Url: http://www.networkupstools.org/ Source: %{name}-%{version}.tar.bz2 Source1: upsd.init @@ -35,6 +35,7 @@ Patch3: nut-notifyflag.patch Patch4: nut-powersave.patch Patch5: nut-pkgconfig.patch Patch6: nut-udev.patch +Patch7: nut-hidparser.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq /bin/chown /bin/chmod %{_bindir}/fgrep %{_bindir}/grep %{_bindir}/sed %{_bindir}/head %{_bindir}/md5sum %define apache_serverroot %(%{_sbindir}/apxs2 -q datadir 2>/dev/null || %{_sbindir}/apxs -q PREFIX) @@ -146,6 +147,7 @@ mv upsd-early-powerdown.init upsd-early-powerdown %if %suse_version >= 1030 %patch6 %endif +%patch7 -p2 sed -i "s/@UPSD_USER@/%{USER}/g" upsd.init conf/upsmon.conf.sample %build @@ -287,6 +289,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/*.pc %doc %{_mandir}/man3/*.* %changelog +* Thu Oct 25 2007 - sbrabec@suse.cz +- Fixed use of uninitialized memory (#331749#c13). * Tue Oct 23 2007 - sbrabec@suse.cz - Renamed web pages to prevent conflicts. * Mon Oct 22 2007 - sbrabec@suse.cz