ports/72165: [patch] games/freebsd-games: adventure dumps core on save

Joel Ray Holveck joelh at piquan.org
Wed Sep 29 11:00:48 UTC 2004


>Number:         72165
>Category:       ports
>Synopsis:       [patch] games/freebsd-games: adventure dumps core on save
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 29 11:00:44 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Joel Ray Holveck
>Release:        FreeBSD 5.2.1-RELEASE-p10 i386
>Organization:
>Environment:
System: FreeBSD thor.piquan.org 5.2.1-RELEASE-p10 FreeBSD 5.2.1-RELEASE-p10 #2: Sun Sep 26 00:37:32 PDT 2004 joelh at thor.piquan.org:/usr/local/src/freebsd/obj/usr/local/src/freebsd/src/sys/THOR i386

>Description:

The adventure game (from the games/freebsd-games port), when told to
save, dumps core.

>How-To-Repeat:

thor$ adventure

Welcome to Adventure!!  Would you like instructions?
no

You are standing at the end of a road before a small brick building.
Around you is a forest.  A small stream flows out of the building and
down a gully.
save
I can suspend your adventure for you so you can resume later, but
you will have to wait at least 45 minutes before continuing.
Is this acceptable?
yes

OK
What would you like to call the saved version?
/tmp/foo
Segmentation fault (core dumped)
thor$

>Fix:

The enclosed patch creates two new patch files for the port to fix
this bug.

--- advpatch begins here ---
--- files/patch-adventure::crc.c.bak	Wed Sep 29 03:40:45 2004
+++ files/patch-adventure::crc.c	Wed Sep 29 03:33:15 2004
@@ -0,0 +1,11 @@
+--- adventure/crc.c.bak	Sat Feb 23 01:59:45 2002
++++ adventure/crc.c	Wed Sep 29 03:29:37 2004
+@@ -120,7 +120,7 @@
+ 
+ /* Process nr bytes at a time; ptr points to them */
+ u_long
+-crc(const char *ptr, size_t nr)
++crc(const char *ptr, ssize_t nr)
+ {
+ 	int 	i;
+ 	const char 	*p;
--- files/patch-adventure::hdr.c.bak	Wed Sep 29 03:40:45 2004
+++ files/patch-adventure::hdr.h	Wed Sep 29 03:33:25 2004
@@ -0,0 +1,11 @@
+--- adventure/hdr.h.bak	Mon Nov 10 15:46:52 2003
++++ adventure/hdr.h	Wed Sep 29 03:30:55 2004
+@@ -167,7 +167,7 @@
+ void checkhints (void);
+ void ciao (void);
+ extern gid_t	egid;
+-u_long crc (const char *ptr, size_t nr);
++u_long crc (const char *ptr, ssize_t nr);
+ void crc_start (void);
+ int dark (void);
+ void datime (int *d, int *t);
--- advpatch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list