summaryrefslogtreecommitdiffstats
path: root/src/gui.c
diff options
context:
space:
mode:
authorChristian Brabandt <cb@256bit.org>2023-10-05 22:08:30 +0200
committerChristian Brabandt <cb@256bit.org>2023-10-05 22:10:10 +0200
commit20d161ace307e28690229b68584f2d84556f8960 (patch)
treea32cb8c7f5a18d862253b3b6832d2d38f97f1210 /src/gui.c
parent290b887e8cc2c0d3dfc7f315b2052472c7c589cc (diff)
patch 9.0.1992: [security] segfault in exmodev9.0.1992
Problem: segfault in exmode when redrawing Solution: skip gui_scroll when exmode_active Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui.c b/src/gui.c
index 1f546b2a75..9c9aa3cbec 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -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.