diff --git a/bsd-games-2.17-backgammonsize.patch b/bsd-games-2.17-backgammonsize.patch new file mode 100644 index 0000000..f5d6bdc --- /dev/null +++ b/bsd-games-2.17-backgammonsize.patch @@ -0,0 +1,22 @@ +--- backgammon/common_source/fancy.c.orig 2010-04-18 16:59:55.000000000 -0700 ++++ backgammon/common_source/fancy.c 2010-04-18 17:27:47.000000000 -0700 +@@ -575,7 +575,7 @@ + } + curr = curc = 0; /* fix position markers */ + realr = realc = -1; +- for (i = 0; i < 24; i++)/* clear line counts */ ++ for (i = 0; i < LI; i++)/* clear line counts */ + linect[i] = -1; + buffnum = -1; /* ignore leftover buffer contents */ + tputs(CL, CO, addbuf); /* put CL in buffer */ +@@ -726,9 +726,9 @@ + lUP = strlen(UP); + if (ND) + lND = strlen(ND); ++ linect = (int *) calloc(LI + 1, sizeof(int)); + if (LI < 24 || CO < 72 || !(CL && UP && ND)) + return (0); +- linect = (int *) calloc(LI + 1, sizeof(int)); + if (linect == NULL) { + write(2, "\r\nOut of memory!\r\n", 18); + getout(0); diff --git a/bsd-games.spec b/bsd-games.spec index f3980c9..4e1b38e 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: 29%{?dist} +Release: 30%{?dist} License: BSD and BSD with advertising Group: Amusements/Games URL: ftp://metalab.unc.edu/pub/Linux/games/ @@ -33,6 +33,7 @@ Patch12: bsd-games-2.17-tetris-rename.patch 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 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ncurses-devel words flex bison Requires(Pre): /usr/sbin/groupadd @@ -63,6 +64,7 @@ install -p -m 755 %{SOURCE1} . %patch13 -p1 -b .gcc43 %patch14 -p0 -b .wordlimit %patch15 -p0 -b .wtfupdate +%patch16 -p0 -b .backgammonsize %build # We include a templatized configuration settings file to set @@ -187,6 +189,10 @@ rm -rf $RPM_BUILD_ROOT %doc AUTHORS COPYING ChangeLog ChangeLog.0 THANKS YEAR2000 README.hunt trek/USD.doc/trek.me %changelog +* Sun Apr 18 2010 Wart 2.17-30 +- Add patch to fix core dump in backgammon when screen is < 24 lines + tall (BZ #580749) + * Tue Oct 20 2009 Wart 2.17-29 - Updated acronym databases (BZ #529921) - Allow more words in a boggle game (BZ #500187)