File vim-8.0.1568-CVE-2021-3984.patch of Package vim.23083
--- vim-8.0.1568.orig/src/misc1.c 2022-02-03 20:50:13.629648897 +0200
+++ vim-8.0.1568/src/misc1.c 2022-02-17 15:13:21.317669646 +0200
@@ -6766,10 +6766,10 @@
static pos_T *
find_start_brace(void) /* XXX */
{
- pos_T cursor_save;
- pos_T *trypos;
- pos_T *pos;
- static pos_T pos_copy;
+ pos_T cursor_save;
+ pos_T *trypos;
+ pos_T *pos;
+ static pos_T pos_copy;
cursor_save = curwin->w_cursor;
while ((trypos = findmatchlimit(NULL, '{', FM_BLOCKSTOP, 0)) != NULL)
@@ -6783,7 +6783,7 @@
&& (pos = ind_find_start_CORS(NULL)) == NULL) /* XXX */
break;
if (pos != NULL)
- curwin->w_cursor.lnum = pos->lnum;
+ curwin->w_cursor = *pos;
}
curwin->w_cursor = cursor_save;
return trypos;