# HG changeset patch # User Bram Moolenaar # Date 1544036407 -3600 # Node ID b91cd042c2fc35c2d3e8a4070fe6b468e34ec444 # Parent 5b52bc3a02797449b8f9d397af4ad7f9b72ce974 patch 8.1.0565: asan complains about reading before allocated block commit https://github.com/vim/vim/commit/10600db772a6b50093b8027509d7089c209d1e26 Author: Bram Moolenaar Date: Wed Dec 5 19:46:07 2018 +0100 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. diff --git a/src/gui.c b/src/gui.c --- 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 --- 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,