[net.bugs.4bsd] 4.[123]bsd csh script handling bug--who's got the "right" fix?

ado@elsie.UUCP (Arthur David Olson) (03/25/86)

If you
    repeat 25 echo oops 6789012345678901234567890123456789012345678901 >> file
and then either
    csh file
or
    cat file | csh
you get this output:
    oops: Command not found.
    789012345678901: Command not found.
where "780912345678901" turns out to be what's stored in "file" starting at the
1025th byte.  Could be disastrous if you had something such as
    reform -r *
starting at the 1021st byte--this would end up doing the dreaded
    rm -r *

Now let's set aside the question of whether you really "ought to" use "sh"
rather than "csh" for scripts.  I myself use "sh."  However, there are users
who want to create "csh" scripts.  And so the question:  what's the best way
to fix the above bug and prevent possible calamity for such users?
--
Bugs is a Warner Brothers trademark.
Bug is a Volkswagen trademark.
--
	UUCP: ..decvax!seismo!elsie!ado		ARPA: elsie!ado@seismo.ARPA
	DEC, VAX, Elsie & Ado are Digital, Borden & Shakespeare trademarks.

ptw@encore.UUCP (P. Tucker Withington) (03/25/86)

>If you
>    repeat 25 echo oops 6789012345678901234567890123456789012345678901 >> file
>and then either
>    csh file
>or
>    cat file | csh
>you get this output:
>    oops: Command not found.
>    789012345678901: Command not found.
>where "780912345678901" turns out to be what's stored in "file" starting at the
>1025th byte.  Could be disastrous if you had something such as...

<Toot, toot!>

This bug does not occur in Encore's UMAX 4.2, the proprietary natur of the code prevents me from posting a fix, however.