diff --git a/hdparm-9.43-get_geom.patch b/hdparm-9.43-get_geom.patch new file mode 100644 index 0000000..88414fb --- /dev/null +++ b/hdparm-9.43-get_geom.patch @@ -0,0 +1,13 @@ +Index: hdparm-9.43/geom.c +=================================================================== +--- hdparm-9.43.orig/geom.c ++++ hdparm-9.43/geom.c +@@ -201,7 +201,7 @@ int get_dev_geometry (int fd, __u32 *cyl + __u64 hs = (*heads) * (*sects); + __u64 cyl = (*cyls); + __u64 chs = cyl * hs; +- if (chs < (*nsectors)) ++ if (chs < (*nsectors) && hs) + *cyls = (*nsectors) / hs; + } + } diff --git a/hdparm.spec b/hdparm.spec index bed48e4..e3c976f 100644 --- a/hdparm.spec +++ b/hdparm.spec @@ -10,6 +10,7 @@ Patch0: hdparm-missing-params.patch Patch1: man-page-update.patch Patch2: %{name}-9.43-ditch_dead_code.patch Patch3: %{name}-9.43-close_fd.patch +Patch4: %{name}-9.43-get_geom.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: s390 s390x @@ -24,6 +25,7 @@ performance and to spin down hard drives for power conservation. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags} STRIP=/bin/true LDFLAGS= @@ -44,6 +46,10 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man8/hdparm.8* %changelog +* Wed Aug 07 2013 Michal Minar 9.43-4 +- Fixed division by zero. +- Resolves: #986072 + * Sat Aug 03 2013 Fedora Release Engineering - 9.43-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild