Subject: Re: awk bug in current ?
To: None <current-users@netbsd.org>
From: walt <wa1ter@myrealbox.com>
List: current-users
Date: 03/19/2006 11:12:48
On Sun, 2006-03-19 at 11:12 -0700, John R. Shannon wrote:
> Steven M. Bellovin wrote:
> > On Sun, 19 Mar 2006 09:44:14 -0800, walt <wa1ter@myrealbox.com> wrote:
> > 
> > 
> >> As a temporary workaround until Christos can do the correct fix,
> >> just delete line 890 of /usr/src/dist/nawk/b.c and recompile
> >> and reinstall /usr/src/usr.bin/awk.
> >>
> >> Here is the line to be deleted:
> >>               assert(c < NCHARS);
> >>
> >> That should allow us to rebuild the system when the correct
> >> fix is committed.
> >>
> > Note, of course, that deleting that line enables a very clear buffer
> > overflow.
> > 
> > 		--Steven M. Bellovin, http://www.cs.columbia.edu/~smb
> 
> Something like:
> 
> nas$ diff /usr/src/dist/nawk/b.c /usr/src/dist/nawk/b.c.orig
> 890,891c890,891
> <               if (c < NCHARS)
> <                       f->gototab[s][c] = i;
> ---
>  >               assert(c < NCHARS);
>  >               f->gototab[s][c] = i;
> 
> would be safer...

Christos just committed a fix, and he used "if (c != HAT)".

Postinstall works again, so I'll try building the system and see if it
finishes :o)