bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: parsing bug


From: Thomas E. Dickey
Subject: Re: parsing bug
Date: Fri, 22 Sep 2000 13:52:48 -0400 (EDT)

On Fri, 22 Sep 2000, Daniel Weaver wrote:

> At 06:54 PM 9/21/00 -0400, Thomas Dickey wrote:
> >On Thu, Sep 21, 2000 at 07:11:38PM -0300, Aaron Campbell wrote:
> >> $ uname -a
> >> OpenBSD killswitch 2.8 GENERIC#299 i386
> >> $ /usr/bin/tic /dev/zero
> >> Memory fault (core dumped) 
> >> 
> >...which can be fixed by doing an fstat/stat on the input stream to
> >ensure that it's really a file and not a device or directory (thanks).
> 
> I don't think this is the proper fix.  It may be a bit bizzare but it
> should be legal to do the following:
>    /usr/bin/tic /dev/st6
> 
> Or maybe:
>    /usr/bin/tic /dev/fd0

or
        /usr/bin/tic /usr/bin
?
tic should only be reading a file...
 
> The fact that reading all zero's causes a fault should be fixed at the
> root of the problem.  I could just as easily fill a file with zero's and
> feed it to TIC causing the same abort.

just for curiosity, I'll see where the core dump happens (perhaps an
unchecked malloc - or more likely, overflowing the 4k buffer used for
terminfo entries), but it shouldn't be reading a character device anyway.

-- 
T.E.Dickey <address@hidden>
http://dickey.his.com
ftp://dickey.his.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]