Lakka-LibreELEC/packages/devel/ncurses/patches/ncurses-002-alloc-fallbacks.patch
mglae 4fa3e0ef44 ncurses: build ncursesw for UTF-8 support
- update to 6.3
- Update patches 001 (terminfo xterm) and 002 (alloc fallback)
- add patch 003: fix USE_SCROLL_HINTS/USE_HASHMAP logic
- add patch 004: fix configure option --with-pkg-config-libdir is broken for
  cross compilation
- Add symbolic links of ncursesw to common ncurses lib and header files to allow
  all packages to be build.
2021-12-05 12:19:05 +01:00

14 lines
515 B
Diff

Fix freeing not allocated fallback entries by allocating a copy.
--- 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
@@ -180,6 +180,8 @@ drv_CanHandle(TERMINAL_CONTROL_BLOCK * T
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;