summaryrefslogtreecommitdiffstats
path: root/debian/patches/CVE-2022-0729.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 05:05:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 05:05:20 +0000
commitd314229aa657bc23c0fc99aa79a347326095b190 (patch)
treee2a542e09db76f34502e20a5f9a8c1a4ef52c420 /debian/patches/CVE-2022-0729.patch
parentAdding debian version 2:8.1.0875-5+deb10u2. (diff)
downloadvim-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 '')
-rw-r--r--debian/patches/CVE-2022-0729.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/debian/patches/CVE-2022-0729.patch b/debian/patches/CVE-2022-0729.patch
new file mode 100644
index 0000000..7333268
--- /dev/null
+++ b/debian/patches/CVE-2022-0729.patch
@@ -0,0 +1,43 @@
+From: Markus Koschany <apo@debian.org>
+Date: Sun, 30 Oct 2022 22:10:14 +0100
+Subject: CVE-2022-0729
+
+Origin: https://github.com/vim/vim/commit/6456fae9ba8e72c74b2c0c499eaf09974604ff30
+---
+ src/regexp.c | 5 +++++
+ src/testdir/test_regexp_utf8.vim | 8 ++++++++
+ 2 files changed, 13 insertions(+)
+
+diff --git a/src/regexp.c b/src/regexp.c
+index 6ad928d..33414ce 100644
+--- a/src/regexp.c
++++ b/src/regexp.c
+@@ -5575,6 +5575,11 @@ regmatch(
+ if (rex.input == rex.line)
+ {
+ /* backup to last char of previous line */
++ if (rex.lnum == 0)
++ {
++ status = RA_NOMATCH;
++ break;
++ }
+ --rex.lnum;
+ rex.line = reg_getline(rex.lnum);
+ /* Just in case regrepeat() didn't count
+diff --git a/src/testdir/test_regexp_utf8.vim b/src/testdir/test_regexp_utf8.vim
+index 75485dc..378bc21 100644
+--- a/src/testdir/test_regexp_utf8.vim
++++ b/src/testdir/test_regexp_utf8.vim
+@@ -215,4 +215,12 @@ func Test_match_invalid_byte()
+ call delete('Xinvalid')
+ endfunc
+
++func Test_match_too_complicated()
++ set regexpengine=1
++ exe "vsplit \xeb\xdb\x99"
++ silent! buf \&\zs*\zs*0
++ bwipe!
++ set regexpengine=0
++endfunc
++
+ " vim: shiftwidth=2 sts=2 expandtab