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

Jeff Makey jmakey at fedoraproject.org
Thu Jan 26 18:12:45 UTC 2012


commit 9c08b82d046bd881c36d069a8145f047e35cddd4
Author: Jeff Makey <jeff at makey.net>
Date:   Thu Jan 26 10:12:28 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 0260517..ca76fd4 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: 34%{?dist}
+Release: 35%{?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-35
+- Fix segmentation fault on 64-bit systems when saving adventure game.
+  (BZ #710936)
+
 * Tue May  3 2011 Ville Skyttä <ville.skytta at iki.fi> - 2.17-34
 - Fix Requires(pre) syntax for group creation.
 - Create groups as specified in packaging guidelines.


More information about the scm-commits mailing list