]> granicus.if.org Git - vim/commitdiff
patch 9.0.0462: ASAN warning for integer overflow v9.0.0462
authorBram Moolenaar <Bram@vim.org>
Wed, 14 Sep 2022 11:06:53 +0000 (12:06 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 14 Sep 2022 11:06:53 +0000 (12:06 +0100)
Problem:    ASAN warning for integer overflow.
Solution:   Check for tp_col to be MAXCOL.

src/textprop.c
src/version.c

index d2536ce776423c4ef3c228fee84cd766d1602d06..ba21e751bff454ffa8edce66e9035d4420cdd8be 100644 (file)
@@ -2289,7 +2289,7 @@ adjust_props_for_split(
 
            *p = prop;
            ++prevprop.ga_len;
-           if (p->tp_col + p->tp_len >= kept)
+           if (p->tp_col != MAXCOL && p->tp_col + p->tp_len >= kept)
                p->tp_len = kept - p->tp_col;
            if (cont_next)
                p->tp_flags |= TP_FLAG_CONT_NEXT;
index 62a43a70873cfc851c16f6c582dba7e87d1fead3..f1805666c3ad5c14d1065c99737a7afd203095d2 100644 (file)
@@ -703,6 +703,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    462,
 /**/
     461,
 /**/