mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 9.0.1916: Crash when allocating large terminal screen
Problem: Crash when allocating large terminal screen Solution: Don't allow values > 1000 for terminal screen columns and rows closes: #13126 Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -272,6 +272,10 @@ parse_termwinsize(win_T *wp, int *rows, int *cols)
|
||||
}
|
||||
*rows = atoi((char *)wp->w_p_tws);
|
||||
*cols = atoi((char *)p + 1);
|
||||
if (*rows > 1000)
|
||||
*rows = 1000;
|
||||
if (*cols > 1000)
|
||||
*cols = 1000;
|
||||
return minsize;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user