Blame SOURCES/vim-cve3778-fix.patch

b6500d
diff -up vim80/src/regexp_nfa.c.cve3796-fix vim80/src/regexp_nfa.c
b6500d
--- vim80/src/regexp_nfa.c.cve3796-fix	2021-09-20 08:27:13.752604505 +0200
b6500d
+++ vim80/src/regexp_nfa.c	2021-09-20 08:29:10.206546910 +0200
b6500d
@@ -5493,7 +5493,8 @@ find_match_text(colnr_T startcol, int re
b6500d
 		match = FALSE;
b6500d
 		break;
b6500d
 	    }
b6500d
-	    len2 += MB_CHAR2LEN(c2);
b6500d
+	    len2 += enc_utf8 ? utf_ptr2len(regline + col + len2)
b6500d
+							     : MB_CHAR2LEN(c2);
b6500d
 	}
b6500d
 	if (match
b6500d
 #ifdef FEAT_MBYTE