[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Crash on unknown terminal
From: |
Thomas Dickey |
Subject: |
Re: Crash on unknown terminal |
Date: |
Sat, 17 Feb 2018 13:29:44 -0500 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Sat, Feb 17, 2018 at 06:36:57PM +0100, David Macek wrote:
> Hi, after updating a few things recently, a crash started to appear
> whenever a bad (unknown) terminal name was specified.
>
> I managed to trace the crash to a double-free as described below. My test
> program is this:
>
> ```
> #include <ncurses.h>
>
> int main() {
> newterm("x", stdout, stdin);
> }
> ```
>
> In `TINFO_SETUP_TERM`, given `USE_TERM_DRIVER`=1 and `reuse`=0, line 720
> attempts to initialize the unknown terminal. When it fails, lines 726 frees
> the above-allocated `my_tcb` (aliased as `termp` and `TCB`).
Is this a library that you compiled, or is it from a package?
(To investigate this, I'll need to know what configure options
were used, and offhand only mingw is likely to have a package with
this feature).
--
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc
Description: Digital signature