[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
games/xpat2
- To: ports@openbsd.org
- Subject: games/xpat2
- From: Anil Madhavapeddy <anil@recoil.org>
- Date: Thu, 28 Aug 2003 18:19:08 +0100
- Content-Disposition: inline
- User-Agent: Mutt/1.4.1i
anyone play this game? looks like the save routine might throw stack garbage in.
if you could test this patch that would be good.
Index: patches/patch-src_loadsave_c
===================================================================
RCS file: patches/patch-src_loadsave_c
diff -N patches/patch-src_loadsave_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_loadsave_c 28 Aug 2003 17:20:00 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+--- src/loadsave.c.orig 2003-08-28 13:11:10.000000000 -0400
++++ src/loadsave.c 2003-08-28 13:14:20.000000000 -0400
+@@ -154,9 +154,9 @@ void save_game(const char *file) {
+ FILE *fp;
+ char buffer[32];
+ char filename[64]; /* must be 15 at least */
+- long args[24];
++ long args[NARGS];
+ int i;
+- unsigned char p[4 * 24];
++ unsigned char p[4 * NARGS];
+
+ if (!file) {
+ /* compute the filename to use */