2022-02-05 14:23:32 +00:00
|
|
|
Fix freeing not allocated fallback entries by allocating a copy.
|
|
|
|
|
2022-02-07 01:41:01 +00:00
|
|
|
--- a/ncurses/tinfo/lib_setup.c 2018-11-24 23:13:16.000000000 +0100
|
|
|
|
+++ b/ncurses/tinfo/lib_setup.c 2018-12-29 10:31:01.000000000 +0100
|
|
|
|
@@ -756,6 +756,8 @@ TINFO_SETUP_TERM(TERMINAL **tp,
|
|
|
|
if (status != TGETENT_YES) {
|
|
|
|
const TERMTYPE2 *fallback = _nc_fallback2(tname);
|
|
|
|
|
|
|
|
+ if (fallback)
|
|
|
|
+ fallback = _nc_copy_entry(fallback);
|
|
|
|
if (fallback) {
|
|
|
|
T(("found fallback entry"));
|
|
|
|
TerminalType(termp) = *fallback;
|
2022-02-05 14:23:32 +00:00
|
|
|
--- a/ncurses/tinfo/tinfo_driver.c 2018-11-24 23:17:03.000000000 +0100
|
|
|
|
+++ b/ncurses/tinfo/tinfo_driver.c 2018-12-29 10:27:19.000000000 +0100
|
2022-02-07 01:41:01 +00:00
|
|
|
@@ -172,6 +172,8 @@ drv_CanHandle(TERMINAL_CONTROL_BLOCK * T
|
2022-02-05 14:23:32 +00:00
|
|
|
if (status != TGETENT_YES) {
|
|
|
|
const TERMTYPE2 *fallback = _nc_fallback2(tname);
|
|
|
|
|
|
|
|
+ if (fallback)
|
|
|
|
+ fallback = _nc_copy_entry(fallback);
|
|
|
|
if (fallback) {
|
|
|
|
T(("found fallback entry"));
|
|
|
|
TerminalType(termp) = *fallback;
|