diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-08 05:05:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-08 05:05:34 +0000 |
commit | cbedd7c5597b906e5de95debeced81743a21a9f1 (patch) | |
tree | 23004fa91a33d235aa7c06049d3420a238f24eb7 /debian/patches/CVE-2022-1154.patch | |
parent | Releasing debian version 2:8.1.0875-5+deb10u2progress5u1. (diff) | |
download | vim-cbedd7c5597b906e5de95debeced81743a21a9f1.tar.xz vim-cbedd7c5597b906e5de95debeced81743a21a9f1.zip |
Merging debian version 2:8.1.0875-5+deb10u3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/CVE-2022-1154.patch')
-rw-r--r-- | debian/patches/CVE-2022-1154.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/debian/patches/CVE-2022-1154.patch b/debian/patches/CVE-2022-1154.patch new file mode 100644 index 0000000..42799a0 --- /dev/null +++ b/debian/patches/CVE-2022-1154.patch @@ -0,0 +1,31 @@ +From: Markus Koschany <apo@debian.org> +Date: Sun, 30 Oct 2022 22:46:37 +0100 +Subject: CVE-2022-1154 + +Origin: https://github.com/vim/vim/commit/b55986c52d4cd88a22d0b0b0e8a79547ba13e1d5 +--- + src/regexp.c | 8 ++++++++ + src/testdir/test_regexp_latin.vim | 14 ++++++++++++++ + 2 files changed, 22 insertions(+) + +diff --git a/src/regexp.c b/src/regexp.c +index 33414ce..4345df9 100644 +--- a/src/regexp.c ++++ b/src/regexp.c +@@ -4322,8 +4322,16 @@ regmatch( + int mark = OPERAND(scan)[0]; + int cmp = OPERAND(scan)[1]; + pos_T *pos; ++ size_t col = REG_MULTI ? rex.input - rex.line : 0; + + pos = getmark_buf(rex.reg_buf, mark, FALSE); ++ // Line may have been freed, get it again. ++ if (REG_MULTI) ++ { ++ rex.line = reg_getline(rex.lnum); ++ rex.input = rex.line + col; ++ } ++ + if (pos == NULL /* mark doesn't exist */ + || pos->lnum <= 0 /* mark isn't set in reg_buf */ + || (pos->lnum == rex.lnum + rex.reg_firstlnum |