changeset 30253:c0c7a6748061 v9.0.0462

patch 9.0.0462: ASAN warning for integer overflow Commit: https://github.com/vim/vim/commit/98b373075e9a2ed642bc89f4f543e31d1428466f Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 14 12:06:53 2022 +0100 patch 9.0.0462: ASAN warning for integer overflow Problem: ASAN warning for integer overflow. Solution: Check for tp_col to be MAXCOL.
author Bram Moolenaar <Bram@vim.org>
date Wed, 14 Sep 2022 13:15:07 +0200
parents 6ee5aa4259af
children b8a12300c168
files src/textprop.c src/version.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -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;
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    462,
+/**/
     461,
 /**/
     460,