Date: Sun, 16 Jun 2002 02:44:23 -0400 (EDT) From: Joe Marcus Clarke <marcus@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/39358: [PATCH] sed is broken in -CURRENT Message-ID: <200206160644.g5G6iNva095778@shumai.marcuscom.com>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206160644.g5G6iNva095778>