0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.1.0565: asan complains about reading before allocated block

Problem:    Asan complains about reading before allocated block.
Solution:   Workaround: Avoid offset from becoming negative.
This commit is contained in:
Bram Moolenaar
2018-12-05 19:46:07 +01:00
parent 88b53fd052
commit 10600db772
2 changed files with 4 additions and 1 deletions

View File

@@ -2753,7 +2753,8 @@ gui_redraw_block(
}
else if (enc_utf8)
{
if (ScreenLines[off + col1] == 0)
// FIXME: how can the first character ever be zero?
if (col1 > 0 && ScreenLines[off + col1] == 0)
--col1;
# ifdef FEAT_GUI_GTK
if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0)