summaryrefslogtreecommitdiffstats
path: root/debian/patches/CVE-2022-0714.patch
blob: 459f7fdb3b38da6653e9f285986c6cc88cc2de98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
From: Markus Koschany <apo@debian.org>
Date: Sun, 30 Oct 2022 21:56:04 +0100
Subject: CVE-2022-0714

Origin: https://github.com/vim/vim/commit/4e889f98e95ac05d7c8bd3ee933ab4d47820fdfa
---
 src/edit.c | 2 ++
 1 file changed, 2 insertions(+)

--- a/src/edit.c
+++ b/src/edit.c
@@ -2113,6 +2113,8 @@ change_indent(
 		new_cursor_col += (*mb_ptr2len)(ptr + new_cursor_col);
 	    else
 		++new_cursor_col;
+	    if (ptr[new_cursor_col] == NUL)
+		break;
 	    vcol += lbr_chartabsize(ptr, ptr + new_cursor_col, (colnr_T)vcol);
 	}
 	vcol = last_vcol;