pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/games/moria



Module Name:    pkgsrc
Committed By:   maya
Date:           Sun Oct 15 03:16:07 UTC 2017

Modified Files:
        pkgsrc/games/moria: Makefile distinfo
        pkgsrc/games/moria/patches: patch-ac patch-ad
Added Files:
        pkgsrc/games/moria/patches: patch-source_generate.c
            patch-source_tables.c

Log Message:
moria: disable fortify, try to put sense into package.

avoid implicit declarations - add includes where necessary, use
memset rather than bzero while at it - it's the more portable one.

avoid global buffer overflow found via asan.

disable fortify because it still won't run and no tool I've tried found
what's wrong. it's corrupting the GOT at init according to gdb.

bump PKGREVISION


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 pkgsrc/games/moria/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/games/moria/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/games/moria/patches/patch-ac
cvs rdiff -u -r1.3 -r1.4 pkgsrc/games/moria/patches/patch-ad
cvs rdiff -u -r0 -r1.1 pkgsrc/games/moria/patches/patch-source_generate.c \
    pkgsrc/games/moria/patches/patch-source_tables.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/games/moria/Makefile
diff -u pkgsrc/games/moria/Makefile:1.19 pkgsrc/games/moria/Makefile:1.20
--- pkgsrc/games/moria/Makefile:1.19    Tue Jan  3 21:50:53 2017
+++ pkgsrc/games/moria/Makefile Sun Oct 15 03:16:07 2017
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.19 2017/01/03 21:50:53 roy Exp $
+# $NetBSD: Makefile,v 1.20 2017/10/15 03:16:07 maya Exp $
 
 DISTNAME=              um5.5.2
 PKGNAME=               moria-5.5.2
-PKGREVISION=           5
+PKGREVISION=           6
 CATEGORIES=            games
 # The "offical" master site has lost the pub/Games directory.
 #MASTER_SITES=         ftp://ftp.cis.ksu.edu/pub/Games/Moria/source/
@@ -28,5 +28,7 @@ do-configure:
        @${RM} -f ${WRKSRC}/*.[ch] ${WRKSRC}/Makefile
        @cd ${WRKSRC}; ${LN} -s source/* unix/* .
 
+PKGSRC_USE_FORTIFY=no
+
 .include "../../mk/curses.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/games/moria/distinfo
diff -u pkgsrc/games/moria/distinfo:1.13 pkgsrc/games/moria/distinfo:1.14
--- pkgsrc/games/moria/distinfo:1.13    Tue Nov  3 20:56:59 2015
+++ pkgsrc/games/moria/distinfo Sun Oct 15 03:16:07 2017
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.13 2015/11/03 20:56:59 agc Exp $
+$NetBSD: distinfo,v 1.14 2017/10/15 03:16:07 maya Exp $
 
 SHA1 (um5.5.2.tar.Z) = 69c7a7bf4e2c5be123ee7a82f5ad12ad5d0f5b08
 RMD160 (um5.5.2.tar.Z) = 1556c76f151d7ea29da79071a57398f63d0b138b
@@ -6,8 +6,8 @@ SHA512 (um5.5.2.tar.Z) = 987bbccb9cb4870
 Size (um5.5.2.tar.Z) = 910536 bytes
 SHA1 (patch-aa) = 45338539960c193e9f7556aa6a588cf40bfbe726
 SHA1 (patch-ab) = 21418a69d7a694894dd9408513693f87fff91953
-SHA1 (patch-ac) = ea9e23de0a147f317a579a4a04502cb165b4c4bd
-SHA1 (patch-ad) = f83f4596677b8d37493145f82a4d2d5cb489b53a
+SHA1 (patch-ac) = aefb05ebf219bcf803d92409937f48a65c0a6b0a
+SHA1 (patch-ad) = a13dade7ce548ed078870db8b63548d0a91265dc
 SHA1 (patch-ae) = 5cf8ad7c6e5d87856a31a5456ba9ed2422075988
 SHA1 (patch-af) = f8a9f32dffa2123512e36c774ca75e0b28a053cc
 SHA1 (patch-ag) = af425b9a48c17f170fc780909b7287264a053cc4
@@ -18,3 +18,5 @@ SHA1 (patch-ak) = 3b39f9bd883cae5cd0a8a2
 SHA1 (patch-al) = 0625fd70eeecaa7e0b5f5874b180244fb1f034c2
 SHA1 (patch-am) = b5d250e9b870e3540c382c7e7c588e1f1c5a4910
 SHA1 (patch-source_files_c) = 56d4c89b4ab2b0e916f06a39cfb25b8cb6a52877
+SHA1 (patch-source_generate.c) = 2f659fab5d7a54a93b2abeea16ef9540b5d76466
+SHA1 (patch-source_tables.c) = b934535fdf8d1ee53e24538ff92be591d72e4b6c

Index: pkgsrc/games/moria/patches/patch-ac
diff -u pkgsrc/games/moria/patches/patch-ac:1.2 pkgsrc/games/moria/patches/patch-ac:1.3
--- pkgsrc/games/moria/patches/patch-ac:1.2     Mon Apr 26 10:55:27 2004
+++ pkgsrc/games/moria/patches/patch-ac Sun Oct 15 03:16:07 2017
@@ -1,8 +1,23 @@
-$NetBSD: patch-ac,v 1.2 2004/04/26 10:55:27 seb Exp $
+$NetBSD: patch-ac,v 1.3 2017/10/15 03:16:07 maya Exp $
 
 --- source/config.h.orig       1994-07-22 01:47:13.000000000 +0000
 +++ source/config.h
-@@ -200,16 +200,18 @@ some of the system defines set up here.
+@@ -12,6 +12,14 @@ Constant.h should always be included aft
+ some of the system defines set up here.
+ #endif
+ 
++#include <sys/stat.h>
++
++#include <time.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++
+ /* Person to bother if something goes wrong.  */
+ /* Recompile files.c and misc2.c if this changes.  */
+ #define WIZARD        "David Grabiner"
+@@ -200,16 +208,18 @@ some of the system defines set up here.
  
  /* This must be unix; change MORIA_LIB as appropriate.  */
  #define MORIA_SAV     "moria.save"

Index: pkgsrc/games/moria/patches/patch-ad
diff -u pkgsrc/games/moria/patches/patch-ad:1.3 pkgsrc/games/moria/patches/patch-ad:1.4
--- pkgsrc/games/moria/patches/patch-ad:1.3     Tue Mar  6 23:25:48 2007
+++ pkgsrc/games/moria/patches/patch-ad Sun Oct 15 03:16:07 2017
@@ -1,6 +1,6 @@
-$NetBSD: patch-ad,v 1.3 2007/03/06 23:25:48 rillig Exp $
---- source/io.c.orig   1994-07-22 03:47:26.000000000 +0200
-+++ source/io.c        2007-03-07 00:06:06.234247718 +0100
+$NetBSD: patch-ad,v 1.4 2017/10/15 03:16:07 maya Exp $
+--- source/io.c.orig   1994-07-22 01:47:26.000000000 +0000
++++ source/io.c
 @@ -90,12 +90,19 @@ typedef struct { int stuff; } fpvmach;
  #include <sys/types.h>
  #endif
@@ -30,6 +30,15 @@ $NetBSD: patch-ad,v 1.3 2007/03/06 23:25
  
    py.misc.male |= 2;
    (void) ioctl(0, TIOCGETP, (char *)&tbuf);
+@@ -313,7 +320,7 @@ void init_curses()
+ #endif
+ 
+   /* PC curses returns ERR */
+-#if defined(USG) && !defined(PC_CURSES) && !defined(AMIGA)
++#if 1
+   if (initscr() == NULL)
+ #else
+   if (initscr() == ERR)
 @@ -331,7 +338,7 @@ void init_curses()
  #if defined(atarist) && defined(__GNUC__)
    (void) signal (SIGTSTP, (__Sigfunc)suspend);

Added files:

Index: pkgsrc/games/moria/patches/patch-source_generate.c
diff -u /dev/null pkgsrc/games/moria/patches/patch-source_generate.c:1.1
--- /dev/null   Sun Oct 15 03:16:07 2017
+++ pkgsrc/games/moria/patches/patch-source_generate.c  Sun Oct 15 03:16:07 2017
@@ -0,0 +1,26 @@
+$NetBSD: patch-source_generate.c,v 1.1 2017/10/15 03:16:07 maya Exp $
+
+Always use memset over bzero.
+As opposed to implicitly declaring bzero, and because memset is a
+part of the C standard.
+
+--- source/generate.c.orig     1994-07-22 01:47:23.000000000 +0000
++++ source/generate.c
+@@ -123,9 +123,6 @@ int *rdir, *cdir;
+ /* Blanks out entire cave                             -RAK-   */
+ static void blank_cave()
+ {
+-#ifndef USG
+-  bzero ((char *)&cave[0][0], sizeof (cave));
+-#else
+ #ifdef MAC
+   /* On the mac, cave is a pointer, so sizeof(cave) = 4! */
+   (void)memset((char *)&cave[0][0], 0,
+@@ -133,7 +130,6 @@ static void blank_cave()
+ #else
+   (void)memset((char *)&cave[0][0], 0, sizeof (cave));
+ #endif
+-#endif
+ }
+ 
+ 
Index: pkgsrc/games/moria/patches/patch-source_tables.c
diff -u /dev/null pkgsrc/games/moria/patches/patch-source_tables.c:1.1
--- /dev/null   Sun Oct 15 03:16:07 2017
+++ pkgsrc/games/moria/patches/patch-source_tables.c    Sun Oct 15 03:16:07 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-source_tables.c,v 1.1 2017/10/15 03:16:07 maya Exp $
+
+Avoid global buffer overflow
+
+--- source/tables.c.orig       1994-07-22 01:47:47.000000000 +0000
++++ source/tables.c
+@@ -13,7 +13,7 @@
+ #ifdef MORIA_HOU
+ /* Operating hours for Moria                          -RAK-   */
+ /*     X = Open; . = Closed                                   */
+-char  days[7][29] = { "SUN:XXXXXXXXXXXXXXXXXXXXXXXX",
++char  days[7][30] =  { "SUN:XXXXXXXXXXXXXXXXXXXXXXXX",
+                   "MON:XXXXXXXX.........XXXXXXX",
+                   "TUE:XXXXXXXX.........XXXXXXX",
+                   "WED:XXXXXXXX.........XXXXXXX",



Home | Main Index | Thread Index | Old Index