import hdparm-9.54-3.el8
This commit is contained in:
parent
4f4c2c8036
commit
88db564699
23
SOURCES/hdparm-9.54-resourceleak-fixes-2.patch
Normal file
23
SOURCES/hdparm-9.54-resourceleak-fixes-2.patch
Normal file
@ -0,0 +1,23 @@
|
||||
diff -up hdparm-9.54/hdparm.c.bak hdparm-9.54/hdparm.c
|
||||
--- hdparm-9.54/hdparm.c.bak 2020-06-01 17:56:47.257520643 +0200
|
||||
+++ hdparm-9.54/hdparm.c 2020-06-01 17:57:29.285084217 +0200
|
||||
@@ -461,12 +461,15 @@ static void dump_identity (__u16 *idw)
|
||||
{
|
||||
int i;
|
||||
char pmodes[64] = {0,}, dmodes[128]={0,}, umodes[128]={0,};
|
||||
- char *model = strip(strndup((char *)&idw[27], 40));
|
||||
- char *fwrev = strip(strndup((char *)&idw[23], 8));
|
||||
- char *serno = strip(strndup((char *)&idw[10], 20));
|
||||
+ char *model = strndup((char *)&idw[27], 40);
|
||||
+ char *model_s = strip(model);
|
||||
+ char *fwrev = strndup((char *)&idw[23], 8);
|
||||
+ char *fwrev_s = strip(fwrev);
|
||||
+ char *serno = strndup((char *)&idw[10], 20);
|
||||
+ char *serno_s = strip(serno);
|
||||
__u8 tPIO;
|
||||
|
||||
- printf("\n Model=%.40s, FwRev=%.8s, SerialNo=%.20s", model, fwrev, serno);
|
||||
+ printf("\n Model=%.40s, FwRev=%.8s, SerialNo=%.20s", model_s, fwrev_s, serno_s);
|
||||
printf("\n Config={");
|
||||
for (i = 0; i <= 15; i++) {
|
||||
if (idw[0] & (1<<i))
|
@ -1,7 +1,7 @@
|
||||
Summary: A utility for displaying and/or setting hard disk parameters
|
||||
Name: hdparm
|
||||
Version: 9.54
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: BSD
|
||||
URL: http://sourceforge.net/projects/%{name}/
|
||||
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
||||
@ -10,6 +10,7 @@ Patch1: %{name}-9.43-close_fd.patch
|
||||
Patch2: %{name}-9.43-get_geom.patch
|
||||
Patch3: %{name}-9.54-sysmacros.patch
|
||||
Patch4: %{name}-9.54-resourceleak-fixes.patch
|
||||
Patch5: %{name}-9.54-resourceleak-fixes-2.patch
|
||||
|
||||
%description
|
||||
Hdparm is a useful system utility for setting (E)IDE hard drive
|
||||
@ -37,6 +38,9 @@ install -c -m 644 hdparm.8 $RPM_BUILD_ROOT/%{_mandir}/man8
|
||||
%{_mandir}/man8/hdparm.8*
|
||||
|
||||
%changelog
|
||||
* Fri Nov 06 2020 Tomas Bzatek <tbzatek@redhat.com> - 9.54-3
|
||||
- fix invalid pointer free (#1833092)
|
||||
|
||||
* Thu Oct 04 2018 Karsten Hopp <karsten@redhat.com> - 9.54-2
|
||||
- fix resource leaks
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user