Skip to content

Commit 10600db

Browse files
committed
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.
1 parent 88b53fd commit 10600db

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/gui.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2753,7 +2753,8 @@ gui_redraw_block(
27532753
}
27542754
else if (enc_utf8)
27552755
{
2756-
if (ScreenLines[off + col1] == 0)
2756+
// FIXME: how can the first character ever be zero?
2757+
if (col1 > 0 && ScreenLines[off + col1] == 0)
27572758
--col1;
27582759
# ifdef FEAT_GUI_GTK
27592760
if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,8 @@ static char *(features[]) =
792792

793793
static int included_patches[] =
794794
{ /* Add new patch number below this line */
795+
/**/
796+
565,
795797
/**/
796798
564,
797799
/**/

0 commit comments

Comments
 (0)