- Preventing SEGVs when an incomplete record appears (#1017715)

This commit is contained in:
Jaromir Capik 2013-10-10 14:28:17 +02:00
parent 04b8019952
commit 5eb5f9ec2e
2 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,14 @@
diff -Naur acct-6.6.1.orig/file_rd.c acct-6.6.1/file_rd.c
--- acct-6.6.1.orig/file_rd.c 2011-03-16 23:50:13.000000000 +0100
+++ acct-6.6.1/file_rd.c 2013-10-10 14:21:21.801097725 +0200
@@ -118,6 +118,10 @@
? max_recs
: fri->buffered_records);
+ /* Preventing SEGV when incomplete record appears */
+ if (recs_to_read==0)
+ goto no_more_records;
+
/* Move back in the file */
(void)fseek(fri->fp, -fri->record_size * recs_to_read,

View File

@ -4,7 +4,7 @@
Summary: Utilities for monitoring process activities
Name: psacct
Version: 6.6.1
Release: 6%{?dist}
Release: 7%{?dist}
License: GPLv3+
Group: Applications/System
URL: http://www.gnu.org/software/acct/
@ -23,6 +23,8 @@ Patch4: psacct-6.6.1-unnumberedsubsubsec.patch
Patch5: psacct-6.6.1-RH-man-page-scan.patch
# Partial replacement for Patch3: psacct-6.3.2-man-pages.patch
Patch6: psacct-6.6.1-man-dump-acct.patch
# Preventing SEGVs when an incomplete record appears
Patch7: psacct-6.6.1-SEGV-when-record-incomplete.patch
Conflicts: filesystem < 3
Conflicts: systemd < 39-1
@ -57,6 +59,7 @@ commands.
%patch4 -p1 -b .subsubsec
%patch5 -p1 -b .rh-man-scan
%patch6 -p1 -b .man-dump-acct
%patch7 -p1
# fixing 'gets' undeclared
sed -i 's|.*(gets,.*||g' lib/stdio.in.h
@ -162,6 +165,9 @@ fi
%changelog
* Thu Oct 10 2013 Jaromir Capik <jcapik@redhat.com> - 6.6.1-7
- Preventing SEGVs when an incomplete record appears (#1017715)
* Wed Aug 21 2013 Jaromir Capik <jcapik@redhat.com> - 6.6.1-6
- Unifying the default file paths (#985150)