0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 9.0.1992: [security] segfault in exmode

Problem:  segfault in exmode when redrawing
Solution: skip gui_scroll when exmode_active

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2023-10-05 22:08:30 +02:00
parent 290b887e8c
commit 20d161ace3
4 changed files with 15 additions and 0 deletions

View File

@@ -4397,6 +4397,7 @@ gui_do_scrollbar(
* Scroll a window according to the values set in the globals
* "current_scrollbar" and "scrollbar_value".
* Return TRUE if the cursor in the current window moved or FALSE otherwise.
* may eventually cause a redraw using updateWindow
*/
int
gui_do_scroll(void)
@@ -4416,6 +4417,9 @@ gui_do_scroll(void)
if (wp == NULL)
// Couldn't find window
return FALSE;
// don't redraw, LineOffset and similar are not valid!
if (exmode_active)
return FALSE;
/*
* Compute number of lines to scroll. If zero, nothing to do.