bug-ncurses
[Top][All Lists]
Advanced

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

Re: [bug-ncurses] Invalid pointer in munmap_chunk


From: Thomas Dickey
Subject: Re: [bug-ncurses] Invalid pointer in munmap_chunk
Date: Sat, 23 Mar 2019 17:06:41 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, Mar 22, 2019 at 10:01:08AM +0100, Dr. Werner Fink wrote:
> On Fri, Mar 22, 2019 at 08:40:29AM +0100, Dr. Werner Fink wrote:
> > Hi,
...
> > as I always have some terminfo added to the builtin fallback database
> > unknown, dumb, xterm, linux, vt100, vt102, and vt220
> > I wonder why this happens

thanks (I can reproduce the problem using the test/demo_termcap program,
giving it those terminfo entries after configuring with a bogus terminfo
path).
 
> Maybe something like this
> 
> --- ncurses-6.1/ncurses/tinfo/lib_setup.c
> +++ ncurses-6.1/ncurses/tinfo/lib_setup.c     2019-03-22 08:46:01.634603415 
> +0000
> @@ -761,7 +761,11 @@ TINFO_SETUP_TERM(TERMINAL **tp,
>  
>           if (fallback) {
>               T(("found fallback entry"));
> -             TerminalType(termp) = *fallback;
> +#if NCURSES_EXT_NUMBERS
> +             _nc_copy_termtype2(&(TerminalType(termp)),fallback);
> +#else
> +             _nc_copy_termtype(&(TerminalType(termp)),fallback);
> +#endif

That works, but actually the ifdef is not needed, since (see curses.priv.h)
I defined "_copy_termtype2" with that ifdef in mind.  This works for
either case of NCURSES_EXT_NUMBERS:

                _nc_copy_termtype2(&(TerminalType(termp)),fallback);

>               status = TGETENT_YES;
>           }
>       }
> 
> could avoid this. At least it does not crash here anymore ;)
> 
> -- 
>   "Having a smoking section in a restaurant is like having
>           a peeing section in a swimming pool." -- Edward Burr



> _______________________________________________
> Bug-ncurses mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-ncurses


-- 
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

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