From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jun 26 03:40:03 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F00DF106566C for ; Fri, 26 Jun 2009 03:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 74F378FC16 for ; Fri, 26 Jun 2009 03:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n5Q3e1tB025941 for ; Fri, 26 Jun 2009 03:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n5Q3e11b025940; Fri, 26 Jun 2009 03:40:01 GMT (envelope-from gnats) Resent-Date: Fri, 26 Jun 2009 03:40:01 GMT Resent-Message-Id: <200906260340.n5Q3e11b025940@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Matthew D. Fuller" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C949106566C for ; Fri, 26 Jun 2009 03:37:24 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from thyme.infocus-llc.com (server.infocus-llc.com [206.156.254.44]) by mx1.freebsd.org (Postfix) with ESMTP id A395C8FC13 for ; Fri, 26 Jun 2009 03:37:24 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from draco.over-yonder.net (c-75-65-240-232.hsd1.ms.comcast.net [75.65.240.232]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by thyme.infocus-llc.com (Postfix) with ESMTPSA id EF36637B5FF for ; Thu, 25 Jun 2009 22:37:22 -0500 (CDT) Received: by draco.over-yonder.net (Postfix, from userid 100) id 16CE061C52; Thu, 25 Jun 2009 22:37:22 -0500 (CDT) Message-Id: <20090626033722.16CE061C52@draco.over-yonder.net> Date: Thu, 25 Jun 2009 22:37:22 -0500 (CDT) From: "Matthew D. Fuller" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/136060: [PATCH] Some bugfixes for match/physcalc X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Matthew D. Fuller" List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2009 03:40:03 -0000 >Number: 136060 >Category: ports >Synopsis: [PATCH] Some bugfixes for match/physcalc >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: Fri Jun 26 03:40:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Matthew D. Fuller >Release: FreeBSD 7.1-STABLE i386 >Organization: >Environment: System: FreeBSD draco.over-yonder.net 7.1-STABLE FreeBSD 7.1-STABLE #0: Tue Feb 17 18:07:44 CST 2009 root@draco.over-yonder.net:/bsd/obj/bsd/src/sys/DRACO i386 >Description: Several problems in physcalc are addressed. 1) The path to the .phy files was built up using un-zero'd memory, so it could (and did, for me) break in strange and unexpected ways. 2) EOF on input (e.g., ^D) would cause it to loop forever. >How-To-Repeat: >Fix: Index: Makefile =================================================================== RCS file: /draco/cvs/ports/math/physcalc/Makefile,v retrieving revision 1.9 diff -u -r1.9 Makefile --- Makefile 10 May 2006 22:37:11 -0000 1.9 +++ Makefile 26 Jun 2009 03:23:54 -0000 @@ -7,6 +7,7 @@ PORTNAME= physcalc PORTVERSION= 2.4 +PORTREVISION= 1 CATEGORIES= math MASTER_SITES= ftp://ftp.lightlink.com/pub/vulcan/ DISTNAME= ${PORTNAME} Index: files/patch-ab =================================================================== RCS file: /draco/cvs/ports/math/physcalc/files/patch-ab,v retrieving revision 1.1 diff -u -r1.1 patch-ab --- files/patch-ab 27 Aug 2000 23:32:03 -0000 1.1 +++ files/patch-ab 26 Jun 2009 03:23:40 -0000 @@ -1,5 +1,5 @@ ---- physconv.c Sun Aug 27 17:57:24 2000 -+++ physconv.c.new Sun Aug 27 18:03:58 2000 +--- physconv.c.orig 1998-08-30 15:58:16.000000000 -0500 ++++ physconv.c 2009-06-25 22:22:21.000000000 -0500 @@ -260,12 +260,16 @@ { /* read in lines from fp and do each as if typed from console */ FILE *fp; @@ -11,7 +11,7 @@ #endif - if ((fp = fopen(s,"r"))==NULL) { -+ fullpath = malloc( strlen( SHAREDIR ) + strlen( s ) + 1 ); ++ fullpath = calloc( strlen( SHAREDIR ) + strlen( s ) + 1, 1 ); + bcopy(SHAREDIR, fullpath, strlen(SHAREDIR)); + (void) strcat(fullpath, s); + if ((fp = fopen(fullpath,"r"))==NULL) { Index: files/patch-ac =================================================================== RCS file: /draco/cvs/ports/math/physcalc/files/patch-ac,v retrieving revision 1.1 diff -u -r1.1 patch-ac --- files/patch-ac 27 Aug 2000 23:32:03 -0000 1.1 +++ files/patch-ac 26 Jun 2009 03:33:01 -0000 @@ -1,5 +1,5 @@ ---- physmain.c Sun Aug 27 17:55:04 2000 -+++ physmain.c.new Sun Aug 27 17:55:53 2000 +--- physmain.c.orig 1998-08-30 14:48:34.000000000 -0500 ++++ physmain.c 2009-06-25 22:32:46.000000000 -0500 @@ -227,7 +227,7 @@ printf("Replace %s = ",v->name); printexpr(v->value); @@ -9,12 +9,13 @@ printf("\n"); } else answer[0] = 'Y'; -@@ -711,7 +711,7 @@ +@@ -711,7 +711,8 @@ } else while (TRUE) { printf(">"); - gets(buf); -+ fgets(buf, sizeof(buf), stdin); ++ if(fgets(buf, sizeof(buf), stdin) == NULL) ++ exit(0); do_cmd(buf); } } >Release-Note: >Audit-Trail: >Unformatted: