- Fix off by one in memory separation test

This commit is contained in:
Steve Grubb 2010-01-18 16:56:36 +00:00
commit 746312a33a
2 changed files with 18 additions and 1 deletions

12
amtu-1.0.8-memsep.patch Normal file
View file

@ -0,0 +1,12 @@
diff -urp amtu-1.0.8.orig/src/memsep.c amtu-1.0.8/src/memsep.c
--- amtu-1.0.8.orig/src/memsep.c 2010-01-18 10:56:48.000000000 -0500
+++ amtu-1.0.8/src/memsep.c 2010-01-18 11:42:23.000000000 -0500
@@ -102,7 +102,7 @@ void sig_handler(int sig)
#endif
int *get_pointer_in_range(int *start, int *end)
{
- return (int *)((char *)start + (RANDNUM % ((char *)end - (char *)start + 1)));
+ return (int *)((char *)start + (RANDNUM % ((char *)end - (char *)start)));
}
/************************************************************************/

View file

@ -1,13 +1,14 @@
Summary: Abstract Machine Test Utility (AMTU)
Name: amtu
Version: 1.0.8
Release: 5%{?dist}
Release: 6%{?dist}
License: CPL
Group: System Environment/Base
URL: http://sourceforge.net/projects/amtueal/
Source0: %{name}-%{version}.tar.gz
Patch1: amtu-1.0.8-doc.patch
Patch2: amtu-1.0.8-init.patch
Patch3: amtu-1.0.8-memsep.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: audit-libs-devel >= 1.1.2
BuildRequires: automake
@ -25,6 +26,7 @@ http://www.radium.ncsc.mil/tpep/library/protection_profiles/CAPP-1.d.pdf
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
touch ChangeLog
@ -59,6 +61,9 @@ fi
%attr(0644,root,root) %{_mandir}/man8/*
%changelog
* Mon Jan 18 2010 Steve Grubb <sgrubb@redhat.com> - 1.0.8-6
- Fix off by one in memory separation test
* Fri Sep 11 2009 Steve Grubb <sgrubb@redhat.com> - 1.0.8-5
- Corrected config file test (#522708)
- Made init script more LSB compatible (#522789)