summaryrefslogtreecommitdiffstats
path: root/debian/patches/CVE-2023-0054.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 05:09:06 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 05:09:06 +0000
commitfe9135eaa14adace367ce3e0de55c4b53e5223c8 (patch)
treecf0f56b778db5c718f20f8d2ab7058b159b8437c /debian/patches/CVE-2023-0054.patch
parentAdding debian version 2:8.1.0875-5+deb10u4. (diff)
downloadvim-fe9135eaa14adace367ce3e0de55c4b53e5223c8.tar.xz
vim-fe9135eaa14adace367ce3e0de55c4b53e5223c8.zip
Adding debian version 2:8.1.0875-5+deb10u5.debian/2%8.1.0875-5+deb10u5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/CVE-2023-0054.patch')
-rw-r--r--debian/patches/CVE-2023-0054.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/patches/CVE-2023-0054.patch b/debian/patches/CVE-2023-0054.patch
new file mode 100644
index 0000000..1bb31bb
--- /dev/null
+++ b/debian/patches/CVE-2023-0054.patch
@@ -0,0 +1,26 @@
+From: Markus Koschany <apo@debian.org>
+Date: Sun, 11 Jun 2023 13:48:33 +0200
+Subject: CVE-2023-0054
+
+Bug-Debian: https://bugs.debian.org/1031875
+Origin: https://github.com/vim/vim/commit/3ac1d97a1d9353490493d30088256360435f7731
+---
+ src/eval.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/eval.c b/src/eval.c
+index 659f35c..f22b0ae 100644
+--- a/src/eval.c
++++ b/src/eval.c
+@@ -10612,6 +10612,11 @@ do_string_sub(
+ * - The text after the match.
+ */
+ sublen = vim_regsub(&regmatch, sub, expr, tail, FALSE, TRUE, FALSE);
++ if (sublen <= 0)
++ {
++ ga_clear(&ga);
++ break;
++ }
+ if (ga_grow(&ga, (int)((end - tail) + sublen -
+ (regmatch.endp[0] - regmatch.startp[0]))) == FAIL)
+ {