terminal: fix terminal attribute overflow

fixes #11548
This commit is contained in:
erw7
2020-07-28 00:51:41 +09:00
parent 33eaa171fa
commit b6b270b28f
4 changed files with 16 additions and 3 deletions

View File

@@ -607,6 +607,7 @@ void terminal_get_line_attributes(Terminal *term, win_T *wp, int linenr,
return;
}
width = MIN(TERM_ATTRS_MAX, width);
for (int col = 0; col < width; col++) {
VTermScreenCell cell;
bool color_valid = fetch_cell(term, row, col, &cell);