[bsd-games] Fix segmentation fault on 64-bit systems when saving adventure game. (BZ #710936)

Jeff Makey jmakey at fedoraproject.org
Thu Jan 26 17:51:34 UTC 2012


commit 907f3ce5cafc3afa44a3a27790ca78c2b03204a5
Author: Jeff Makey <jeff at makey.net>
Date:   Thu Jan 26 09:49:57 2012 -0800

    Fix segmentation fault on 64-bit systems when saving adventure game.
    (BZ #710936)

 bsd-games-2.17-adventurecrc.patch |   11 +++++++++++
 bsd-games.spec                    |    8 +++++++-
 2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/bsd-games-2.17-adventurecrc.patch b/bsd-games-2.17-adventurecrc.patch
new file mode 100644
index 0000000..9ce650a
--- /dev/null
+++ b/bsd-games-2.17-adventurecrc.patch
@@ -0,0 +1,11 @@
+--- adventure/crc.c.orig	2003-12-17 03:47:37.000000000 +0100
++++ adventure/crc.c	2011-06-06 12:11:57.284547083 +0200
+@@ -131,6 +131,7 @@
+ 					step = 0;
+ 			}
+ 			crcval = (crcval << 8) ^ crctab[i];
++			crcval &= 0xffffffff;	/* Mask to 32 bits. */
+ 		}
+-	return crcval & 0xffffffff;	/* Mask to 32 bits. */
++	return crcval;
+ }
diff --git a/bsd-games.spec b/bsd-games.spec
index e9c17bd..ffff13f 100644
--- a/bsd-games.spec
+++ b/bsd-games.spec
@@ -4,7 +4,7 @@
 Summary: Collection of text-based games
 Name: bsd-games
 Version: 2.17
-Release: 35%{?dist}
+Release: 36%{?dist}
 License: BSD and BSD with advertising
 Group: Amusements/Games
 URL: ftp://metalab.unc.edu/pub/Linux/games/
@@ -34,6 +34,7 @@ Patch13: bsd-games-2.17-gcc43.patch
 Patch14: bsd-games-2.17-bogglewords.patch
 Patch15: bsd-games-2.17-wtfupdate.patch
 Patch16: bsd-games-2.17-backgammonsize.patch
+Patch17: bsd-games-2.17-adventurecrc.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: ncurses-devel words flex flex-static bison
 Requires(pre): shadow-utils
@@ -65,6 +66,7 @@ install -p -m 755 %{SOURCE1} .
 %patch14 -p0 -b .wordlimit
 %patch15 -p0 -b .wtfupdate
 %patch16 -p0 -b .backgammonsize
+%patch17 -p0 -b .adventurecrc
 
 %build
 # We include a templatized configuration settings file to set
@@ -190,6 +192,10 @@ exit 0
 %doc AUTHORS COPYING ChangeLog ChangeLog.0 THANKS YEAR2000 README.hunt trek/USD.doc/trek.me
 
 %changelog
+* Thu Jan 26 2012 Jeff Makey <jeff at makey.net> - 2.17-36
+- Fix segmentation fault on 64-bit systems when saving adventure game.
+  (BZ #710936)
+
 * Thu Jan 12 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.17-35
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list