diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-08 05:05:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-08 05:05:20 +0000 |
commit | d314229aa657bc23c0fc99aa79a347326095b190 (patch) | |
tree | e2a542e09db76f34502e20a5f9a8c1a4ef52c420 /debian/patches/CVE-2022-1154.patch | |
parent | Adding debian version 2:8.1.0875-5+deb10u2. (diff) | |
download | vim-d314229aa657bc23c0fc99aa79a347326095b190.tar.xz vim-d314229aa657bc23c0fc99aa79a347326095b190.zip |
Adding debian version 2:8.1.0875-5+deb10u3.debian/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 |