From owner-freebsd-ports Fri Dec 22 6:30:10 2000 From owner-freebsd-ports@FreeBSD.ORG Fri Dec 22 06:30:02 2000 Return-Path: Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 08C3237B404 for ; Fri, 22 Dec 2000 06:30:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id eBMEU2q83497; Fri, 22 Dec 2000 06:30:02 -0800 (PST) (envelope-from gnats) Resent-Date: Fri, 22 Dec 2000 06:30:02 -0800 (PST) Resent-Message-Id: <200012221430.eBMEU2q83497@freefall.freebsd.org> Resent-From: gnats-admin@FreeBSD.org (GNATS Management) Resent-To: freebsd-ports@FreeBSD.org Resent-Reply-To: gnats-admin@FreeBSD.org, Kentaro Inagaki / =?iso-2022-jp?B?GyRCMHAzQBsoQiAbJEI3ckJATzobKEI=?= Received: from serio.al.rim.or.jp (serio.al.rim.or.jp [202.247.191.123]) by hub.freebsd.org (Postfix) with ESMTP id C677D37B402 for ; Fri, 22 Dec 2000 06:26:22 -0800 (PST) Received: from mail2.rim.or.jp by serio.al.rim.or.jp (3.7W/HMX-13) id XAA01393 for ; Fri, 22 Dec 2000 23:26:21 +0900 (JST) Received: from localhost (ngno005n018.ppp.infoweb.ne.jp [211.2.14.130]) by mail2.rim.or.jp (8.9.3/3.7W) id XAA28879 for ; Fri, 22 Dec 2000 23:26:20 +0900 (JST) Message-Id: <20001222.232611.07558925.inagaki@tg.rim.or.jp> Date: Fri, 22 Dec 2000 23:26:11 +0900 (JST) From: Kentaro Inagaki / =?iso-2022-jp?B?GyRCMHAzQBsoQiAbJEI3ckJATzobKEI=?= To: FreeBSD-gnats-submit@freebsd.org Subject: ports/23755: [BUGS] audio/tosha is coredumped Resent-Sender: gnats@FreeBSD.org Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 23755 >Category: ports >Synopsis: bug of original tosha >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Dec 22 06:30:01 PST 2000 >Closed-Date: >Last-Modified: >Originator: Inagaki Kentaro & >Release: FreeBSD 5.0-CURRENT #9: Wed Dec 20 22:20:29 JST 2000 i386 >Organization: >Environment: >Description: make and install on current. and type next on console. % tosha -i Device: /dev/cd0c -- "RICOH" "MP6201S" "2.40" Segmentation fault (core dumped) >How-To-Repeat: This bug is on original source. >Fix: Please add following patch in "files" directory. This patch fixed coredump problem and compiler warning problem. --- tosha.c.orig Sat Jan 2 08:57:49 1999 +++ tosha.c Fri Dec 22 23:03:54 2000 @@ -240,8 +240,10 @@ return template; if (!(tmpstr = malloc(strlen(template) + strlen(formatspec->ext) - 1))) out_of_memory(); - if ((prefix = cptr - template)) + if ((prefix = cptr - template)) { strncpy (tmpstr, template, prefix); + *(tmpstr + prefix) = '\0'; + } strcat (tmpstr + prefix, formatspec->ext); prefix += strlen(formatspec->ext); strcat (tmpstr + prefix, cptr + 2); @@ -369,11 +371,12 @@ frmctl = trackctl[i]; break; } - if (frmctl < 0) /* Ugh! */ + if (frmctl < 0) { /* Ugh! */ if (numtracks >= 1 && start >= trackstart[1]) frmctl = trackctl[numtracks - 1]; else frmctl = trackctl[0]; + } } if ((frmctl & 4) == 0) return 1; @@ -698,7 +701,7 @@ * Now get us the stuff! */ - if (!indexonly && (singlefile = startsec >= 0 || !strchr(outname, '%'))) + if (!indexonly && (singlefile = startsec >= 0 || !strchr(outname, '%'))) { if (!strcmp(outname, "-")) pcmfd = 1; else { @@ -710,6 +713,7 @@ O_TRUNC, 0644)) < 0) die ("open(output file)"); } + } if (!quiet) print_head(); get_time (&starttime); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message