diff options
Diffstat (limited to 'debian/patches/CVE-2022-1897.patch')
-rw-r--r-- | debian/patches/CVE-2022-1897.patch | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/debian/patches/CVE-2022-1897.patch b/debian/patches/CVE-2022-1897.patch index 1a44481..e14fb46 100644 --- a/debian/patches/CVE-2022-1897.patch +++ b/debian/patches/CVE-2022-1897.patch @@ -12,15 +12,12 @@ Solution: Disallow undo when in a substitute command. src/version.c | 2 ++ 4 files changed, 51 insertions(+), 21 deletions(-) -diff --git a/src/normal.c b/src/normal.c -index bc3e29e1abaa..53c50dc8b368 100644 --- a/src/normal.c +++ b/src/normal.c -@@ -514,6 +514,22 @@ find_command(int cmdchar) - return idx; +@@ -515,6 +515,22 @@ find_command(int cmdchar) } -+/* + /* + * If currently editing a cmdline or text is locked: beep and give an error + * message, return TRUE. + */ @@ -36,10 +33,11 @@ index bc3e29e1abaa..53c50dc8b368 100644 + return FALSE; +} + - /* ++/* * Execute a command in Normal mode. */ -@@ -775,14 +791,9 @@ normal_cmd( + void +@@ -775,14 +791,9 @@ getcount: goto normal_end; } @@ -57,7 +55,7 @@ index bc3e29e1abaa..53c50dc8b368 100644 goto normal_end; /* -@@ -6164,12 +6175,8 @@ nv_gotofile(cmdarg_T *cap) +@@ -6162,12 +6173,8 @@ nv_gotofile(cmdarg_T *cap) char_u *ptr; linenr_T lnum = -1; @@ -71,7 +69,7 @@ index bc3e29e1abaa..53c50dc8b368 100644 if (curbuf_locked()) { clearop(cap->oap); -@@ -8330,14 +8337,7 @@ nv_g_cmd(cmdarg_T *cap) +@@ -8328,14 +8335,7 @@ nv_g_cmd(cmdarg_T *cap) /* "gQ": improved Ex mode */ case 'Q': @@ -87,8 +85,6 @@ index bc3e29e1abaa..53c50dc8b368 100644 do_exmode(TRUE); break; -diff --git a/src/testdir/test_substitute.vim b/src/testdir/test_substitute.vim -index a1c324ed8d20..c8df09f4ec1e 100644 --- a/src/testdir/test_substitute.vim +++ b/src/testdir/test_substitute.vim @@ -530,3 +530,25 @@ func Test_sub_change_window() @@ -117,8 +113,6 @@ index a1c324ed8d20..c8df09f4ec1e 100644 + delfunc Repl +endfunc + -diff --git a/src/undo.c b/src/undo.c -index cac09f0f58df..81cc28e8b801 100644 --- a/src/undo.c +++ b/src/undo.c @@ -2278,6 +2278,12 @@ undo_time( @@ -134,16 +128,14 @@ index cac09f0f58df..81cc28e8b801 100644 /* First make sure the current undoable change is synced. */ if (curbuf->b_u_synced == FALSE) u_sync(TRUE); -diff --git a/src/version.c b/src/version.c -index 9751865c7adf..cd6c33162204 100644 --- a/src/version.c +++ b/src/version.c -@@ -795,6 +795,8 @@ static char *(features[]) = - 805, +@@ -796,6 +796,8 @@ static int included_patches[] = /**/ 5024, -+/**/ -+ 5023, /**/ ++ 5023, ++/**/ 4977, /**/ + 4921, |