diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-12-05 19:46:07 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-12-05 19:46:07 +0100 |
commit | 10600db772a6b50093b8027509d7089c209d1e26 (patch) | |
tree | c1cdf4d5fbd350eb2ce8710a0236b28caf65a4f5 /src/gui.c | |
parent | 88b53fd0521d1e62df17a8a1f2181425e9d4854c (diff) | |
download | vim-git-10600db772a6b50093b8027509d7089c209d1e26.tar.gz |
patch 8.1.0565: asan complains about reading before allocated blockv8.1.0565
Problem: Asan complains about reading before allocated block.
Solution: Workaround: Avoid offset from becoming negative.
Diffstat (limited to 'src/gui.c')
-rw-r--r-- | src/gui.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) |