tech-userlevel archive

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

Re: audio/moc dumps core in libcurses



On 30/01/2017 04:22, coypu%SDF.ORG@localhost wrote:
> I've applied a patch to audio/moc. It works on my end now.
> It was attempting set_escdelay (25); very early, before setting
> up a window.
> 
> On nbcurses it was:_cursesi_screen->ESCDELAY = escdelay;
> which was a null deref.
> 
> for ncurses, it was returning an error, but it was ignoring it.

We have a lot of similar functions which operate without checking the
terminal has been setup or not.
It *IS* a programming error, so it's probably best to use an assert
rather than simply returning ERR.

Anyone have any stronger opinions on this before I add asserts liberally
to our curses?

Roy


Home | Main Index | Thread Index | Old Index