diff -Nru ncurses-6.1/debian/changelog ncurses-6.1/debian/changelog --- ncurses-6.1/debian/changelog 2018-02-12 09:33:09.000000000 +0000 +++ ncurses-6.1/debian/changelog 2018-05-23 08:08:27.000000000 +0000 @@ -1,3 +1,14 @@ +ncurses (6.1-1ubuntu1.18.04) bionic-proposed; urgency=medium + + * SRU: LP: #1772872: Backport changes from 6.1+20180210-4: + * Move screen.xterm-256color and rxvt-unicode-256color terminfo entries + from ncurses-term to ncurses-base (Closes: #898666, #898948). + * Cherry-pick a fix from the 20180414 patchlevel: add a null-pointer + check in _nc_parse_entry to handle an error when a use-name is invalid + syntax (report by Chung-Yi Lin, CVE-2018-10754). + + -- Matthias Klose Wed, 23 May 2018 10:08:27 +0200 + ncurses (6.1-1ubuntu1) bionic; urgency=low * Merge from Debian unstable. Remaining changes: diff -Nru ncurses-6.1/debian/patches/cve-2018-10754.diff ncurses-6.1/debian/patches/cve-2018-10754.diff --- ncurses-6.1/debian/patches/cve-2018-10754.diff 1970-01-01 00:00:00.000000000 +0000 +++ ncurses-6.1/debian/patches/cve-2018-10754.diff 2018-05-20 05:49:41.000000000 +0000 @@ -0,0 +1,28 @@ +Description: Fix for CVE-2018-10754 in the _nc_write_entry function + Fix for CVE-2018-10754 cherry-picked from upstream patchlevel + 20180414: add a null-pointer check in _nc_parse_entry to handle an + error when a use-name is invalid syntax (report by Chung-Yi Lin). +Author: Sven Joachim +Forwarded: not-needed +Last-Update: 2018-05-09 + +--- + ncurses/tinfo/parse_entry.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/ncurses/tinfo/parse_entry.c ++++ b/ncurses/tinfo/parse_entry.c +@@ -543,9 +543,11 @@ _nc_parse_entry(ENTRY * entryp, int lite + * Otherwise, look for a base entry that will already + * have picked up defaults via translation. + */ +- for (i = 0; i < entryp->nuses; i++) +- if (!strchr((char *) entryp->uses[i].name, '+')) ++ for (i = 0; i < entryp->nuses; i++) { ++ if (entryp->uses[i].name != 0 ++ && !strchr(entryp->uses[i].name, '+')) + has_base_entry = TRUE; ++ } + } + + postprocess_termcap(&entryp->tterm, has_base_entry); diff -Nru ncurses-6.1/debian/patches/series ncurses-6.1/debian/patches/series --- ncurses-6.1/debian/patches/series 2018-02-12 04:18:15.000000000 +0000 +++ ncurses-6.1/debian/patches/series 2018-05-23 08:08:27.000000000 +0000 @@ -1,3 +1,4 @@ 01-debian-no-ada-doc.diff 02-debian-backspace.diff 03-debian-ncursesconfig-omit-L.diff +cve-2018-10754.diff diff -Nru ncurses-6.1/debian/rules ncurses-6.1/debian/rules --- ncurses-6.1/debian/rules 2018-02-12 04:18:15.000000000 +0000 +++ ncurses-6.1/debian/rules 2018-05-23 08:08:27.000000000 +0000 @@ -192,12 +192,12 @@ # Files for /lib/terminfo. libterminfofiles=a/ansi c/cons25 c/cons25-debian c/cygwin d/dumb h/hurd l/linux \ m/mach m/mach-bold m/mach-color m/mach-gnu m/mach-gnu-color p/pcansi \ - r/rxvt r/rxvt-m r/rxvt-basic r/rxvt-unicode \ + r/rxvt r/rxvt-m r/rxvt-basic r/rxvt-unicode r/rxvt-unicode-256color \ s/screen s/screen-bce s/screen-s s/screen-w s/sun v/vt100 v/vt102 \ v/vt220 v/vt52 x/xterm x/xterm-debian x/xterm-xfree86 x/xterm-color \ x/xterm-mono x/xterm-r5 x/xterm-r6 x/xterm-vt220 \ x/xterm-256color s/screen-256color s/screen-256color-bce \ - w/wsvt25 w/wsvt25m E/Eterm E/Eterm-color + s/screen.xterm-256color w/wsvt25 w/wsvt25m E/Eterm E/Eterm-color # Blacklist terminfo entries shipped by other Debian packages so that we do # not begin shipping them by accident.