Problem: [security]: segfault in win_line()
(fizz-is-on-the-way)
Solution: Check that ScreenLines is not NULL
Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-j3g9-wg22-v955
Signed-off-by: Christian Brabandt <cb@256bit.org>
/*
* Don't call updateWindow() when nothing has changed (it will overwrite
* the status line!).
+ *
+ * Check for ScreenLines, because in ex-mode, we don't have a valid display.
*/
- if (old_topline != wp->w_topline
+ if (ScreenLines != NULL && (old_topline != wp->w_topline
|| wp->w_redr_type != 0
#ifdef FEAT_DIFF
|| old_topfill != wp->w_topfill
#endif
- )
+ ))
{
int type = UPD_VALID;
--- /dev/null
+v\1ediv\1evi|gIv|÷³\16\16\16\e\16\16X\80ý\\80ý,\16\16X\80ýX\80ý\\80ý#\r\16X\80ý\\84ý<\80ý\\80ý,X\16\80ùX
call term_sendkeys(buf, args)
call TermWait(buf, 50)
+ let file = 'crash/ex_redraw_crash'
+ let cmn_args = "%s -u NONE -i NONE -n -m -X -Z -e -s -S %s -c ':qa!'"
+ let args = printf(cmn_args, vim, file)
+ call term_sendkeys(buf, args)
+ call TermWait(buf, 150)
+
" clean up
exe buf .. "bw!"
bw!
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1043,
/**/
1042,
/**/