diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-08 05:09:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-08 05:09:20 +0000 |
commit | 711b5e29b9a1e65610a6ac243c55e058e27a03e5 (patch) | |
tree | b43d074b53c71ba5558dd4613e44f7fa85715753 /debian/patches/CVE-2022-0318.patch | |
parent | Releasing progress-linux version 2:8.1.0875-5+deb10u4progress5u1. (diff) | |
download | vim-711b5e29b9a1e65610a6ac243c55e058e27a03e5.tar.xz vim-711b5e29b9a1e65610a6ac243c55e058e27a03e5.zip |
Merging debian version 2:8.1.0875-5+deb10u5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/CVE-2022-0318.patch')
-rw-r--r-- | debian/patches/CVE-2022-0318.patch | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/debian/patches/CVE-2022-0318.patch b/debian/patches/CVE-2022-0318.patch index b2005a7..efe9eca 100644 --- a/debian/patches/CVE-2022-0318.patch +++ b/debian/patches/CVE-2022-0318.patch @@ -20,8 +20,6 @@ Backport: fc6ccebea668c49e9e617e0657421b6a8ed9df1e. * Replace expr-.. by expr-. -diff --git a/src/ops.c b/src/ops.c -index a9968024901e..e0fa344d8ee6 100644 --- a/src/ops.c +++ b/src/ops.c @@ -629,24 +629,12 @@ block_insert( @@ -32,6 +30,9 @@ index a9968024901e..e0fa344d8ee6 100644 - int off; + /* avoid copying part of a multi-byte character */ + offset -= (*mb_head_off)(oldp, oldp + offset); ++ ++ if (spaces < 0) // can happen when the cursor was moved ++ spaces = 0; - /* Avoid starting halfway a multi-byte character. */ - if (b_insert) @@ -48,17 +49,12 @@ index a9968024901e..e0fa344d8ee6 100644 - offset -= off; - } - } -+ if (spaces < 0) // can happen when the cursor was moved -+ spaces = 0; -+ // Make sure the allocated size matches what is actually copied below. newp = alloc_check((unsigned)(STRLEN(oldp)) + spaces + s_len + (spaces > 0 && !bdp->is_short ? p_ts - spaces : 0) -diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim -index b438fa1e66c6..a187aa8e085e 100644 --- a/src/testdir/test_visual.vim +++ b/src/testdir/test_visual.vim -@@ -417,6 +417,15 @@ +@@ -417,6 +417,15 @@ func Test_visual_block_append_invalid_ch bwipe! endfunc @@ -74,8 +70,6 @@ index b438fa1e66c6..a187aa8e085e 100644 " CVE-2022-0361 func Test_visual_ex_copy_line() new -diff --git a/src/testdir/test_utf8.vim b/src/testdir/test_utf8.vim -index 0210ce63c..862e73b9a 100644 --- a/src/testdir/test_utf8.vim +++ b/src/testdir/test_utf8.vim @@ -6,7 +6,7 @@ func Test_visual_block_insert() @@ -87,18 +81,16 @@ index 0210ce63c..862e73b9a 100644 bwipeout! endfunc -diff --git a/src/version.c b/src/version.c -index 53f1619f94d4..227eaa958e2b 100644 --- a/src/version.c +++ b/src/version.c -@@ -797,6 +797,10 @@ static char *(features[]) = - 5024, +@@ -798,6 +798,10 @@ static int included_patches[] = /**/ 4214, -+/**/ + /**/ + 4152, +/**/ + 4151, - /**/ ++/**/ 4120, /**/ + 1401, |