Subject: pkg/34848: NetBSD's sed cannot handle files that are missing the final newline
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <rillig@NetBSD.org>
List: pkgsrc-bugs
Date: 10/18/2006 12:55:01
>Number:         34848
>Category:       pkg
>Synopsis:       NetBSD's sed cannot handle files that are missing the final newline
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 18 12:55:00 +0000 2006
>Originator:     Roland Illig
>Release:        nbsed from pkgsrc-current
>Organization:
>Environment:
SunOS rzdspc5 5.10 Generic_118833-24 sun4u sparc SUNW,Sun-Fire-880

>Description:
The function fgetln from libnbcompat, which is used by sed, probably has the bug.

>How-To-Repeat:
printf "foo" | nbsed | wc -c

I expected 3, but got 1023.

>Fix: