--- ncurses/base/wresize.c.ORIG 2020-04-15 14:37:15.090975219 +0200 +++ ncurses/base/wresize.c 2020-04-15 15:25:29.780981403 +0200 @@ -175,11 +175,12 @@ s = typeMalloc(NCURSES_CH_T, (unsigned) ToCols + 1); if (s == 0) returnCode(cleanup_lines(new_lines, row)); - for (col = 0; col <= ToCols; ++col) { + for (col = 0; col < ToCols; ++col) { s[col] = (col <= size_x ? win->_line[row].text[col] : win->_nc_bkgd); } + s[ToCols] = win->_nc_bkgd; } else { s = win->_line[row].text; }