Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!tektronix!tekgen!puffin!rad
From: rad@puffin.USS.TEK.COM (Richard Doty)
Newsgroups: comp.bugs.misc
Subject: ksh returns erroneous data when there are trailing empty fields
Message-ID: <121@puffin.USS.TEK.COM>
Date: Wed, 25-Nov-87 20:18:08 EST
Article-I.D.: puffin.121
Posted: Wed Nov 25 20:18:08 1987
Date-Received: Sun, 29-Nov-87 12:44:49 EST
Reply-To: rad@puffin.uss.tek.com (Richard Doty)
Organization: Unix Systems Support, Tektronix, Inc., Beaverton, OR
Lines: 44


Index:	ksh/sh/name.c

Description:
	When using a non-default input field separator (such as ':'),
	trailing empty data fields cause ksh to underflow an input
	stack, and thus fail to correctly null-terminate the string
	before assigning it to the variable being read.

	This bug is present in both ksh (Version 02/21/85) and ksh-i
	(Version 06/03/86a) as distributed by the AT&T toolchest.

Repeat-By:
	Execute this shell file:

IFS=:$IFS
while read f1 f2 f3
do	echo f1=\""$f1"\" f2=\""$f2"\" f3=\""$f3"\"
done <