logo       

standards/38195: sed(1)'s process.c does not correctly append lines of inpu: msg#00014

Subject: standards/38195: sed(1)'s process.c does not correctly append lines of input.
>Number:         38195
>Category:       standards
>Synopsis:       sed(1)'s process.c does not correctly append lines of input.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-standards
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 17 10:50:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     J. Mallett
>Release:        HEAD
>Organization:
FreeBSD
>Environment:
...
>Description:
FreeBSD's sed(1) is incompatible with its handling of the G and H commands 
because it does not explicitly append newlines when appending a line of input, 
it relies on them just "popping up" because we use fgetln to get lines of 
input.  This relates to appending the hold or pattern space.
>How-To-Repeat:
(echo 1; echo 2; echo 3; echo 4) | sed '1,2H;2,3G'

with our sed(1), and GNU's, and SysV's.
>Fix:
Create a function to append a line to a given space, instead of using cspace, 
and have it do the correct thing.  Possibly, NUL-terminate at the newline when 
using fgetln(3) at mf_gets.
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@xxxxxxxxxxx
with "unsubscribe freebsd-standards" in the body of the message



<Prev in Thread] Current Thread [Next in Thread>