From 746312a33a983ff76b30db5430ffb0be43bda99f Mon Sep 17 00:00:00 2001 From: Steve Grubb Date: Mon, 18 Jan 2010 16:56:36 +0000 Subject: [PATCH] - Fix off by one in memory separation test --- amtu-1.0.8-memsep.patch | 12 ++++++++++++ amtu.spec | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 amtu-1.0.8-memsep.patch diff --git a/amtu-1.0.8-memsep.patch b/amtu-1.0.8-memsep.patch new file mode 100644 index 0000000..679f08c --- /dev/null +++ b/amtu-1.0.8-memsep.patch @@ -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))); + } + + /************************************************************************/ diff --git a/amtu.spec b/amtu.spec index cd9a3ef..97defc9 100644 --- a/amtu.spec +++ b/amtu.spec @@ -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 - 1.0.8-6 +- Fix off by one in memory separation test + * Fri Sep 11 2009 Steve Grubb - 1.0.8-5 - Corrected config file test (#522708) - Made init script more LSB compatible (#522789)