From owner-freebsd-bugs Sat Jun 15 23:50:19 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7A3FD37B42F for ; Sat, 15 Jun 2002 23:50:02 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g5G6o2L75673; Sat, 15 Jun 2002 23:50:02 -0700 (PDT) (envelope-from gnats) Received: from shumai.marcuscom.com (rdu57-17-158.nc.rr.com [66.57.17.158]) by hub.freebsd.org (Postfix) with ESMTP id 83DF637B40A for ; Sat, 15 Jun 2002 23:44:06 -0700 (PDT) Received: from shumai.marcuscom.com (marcus@localhost.marcuscom.com [127.0.0.1]) by shumai.marcuscom.com (8.12.3/8.12.3) with ESMTP id g5G6iNgl095779 for ; Sun, 16 Jun 2002 02:44:23 -0400 (EDT) (envelope-from marcus@shumai.marcuscom.com) Received: (from marcus@localhost) by shumai.marcuscom.com (8.12.3/8.12.3/Submit) id g5G6iNva095778; Sun, 16 Jun 2002 02:44:23 -0400 (EDT) Message-Id: <200206160644.g5G6iNva095778@shumai.marcuscom.com> Date: Sun, 16 Jun 2002 02:44:23 -0400 (EDT) From: Joe Marcus Clarke Reply-To: Joe Marcus Clarke To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/39358: [PATCH] sed is broken in -CURRENT Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 39358 >Category: bin >Synopsis: [PATCH] sed is broken in -CURRENT >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jun 15 23:50:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Joe Marcus Clarke >Release: FreeBSD 4.6-RC i386 >Organization: MarcusCom, Inc. >Environment: FreeBSD jclarke-pc.cisco.com 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Fri Jun 14 16:13:19 EDT 2002 marcus@jclarke-pc.cisco.com:/usr/obj/usr/src/sys/JCLARKE-PC i386 >Description: After the recent -i fixes, sed no longer works in all instances. Many ports no longer make configure correctly (they hang indefinitely). The problem is that sp->len is being unnecessarily overwritten in mf_fgets(). The attached patch fixes the problem. >How-To-Repeat: # cd /usr/ports/net/gaim # make configure >Fix: --- usr.bin/sed/main.c 2002/06/14 02:20:05 1.23 +++ usr.bin/sed/main.c 2002/06/16 04:38:31 @@ -315,7 +315,8 @@ firstfile = 1; } - sp->len = 0; + if (lastline) + sp->len = 0; for (;;) { if (f != NULL && (c = getc(f)) != EOF) { (void)ungetc(c, f); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message