summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-12-05 19:46:07 +0100
committerBram Moolenaar <Bram@vim.org>2018-12-05 19:46:07 +0100
commit10600db772a6b50093b8027509d7089c209d1e26 (patch)
treec1cdf4d5fbd350eb2ce8710a0236b28caf65a4f5
parent88b53fd0521d1e62df17a8a1f2181425e9d4854c (diff)
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.
-rw-r--r--src/gui.c3
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/gui.c b/src/gui.c
index 6154b48deb..b961108ed8 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -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)
diff --git a/src/version.c b/src/version.c
index bc442425ad..e4f863eaf1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -793,6 +793,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 565,
+/**/
564,
/**/
563,