Commit 36f9f2ed authored by Rocky Automation's avatar Rocky Automation 📺
Browse files

import vim-8.0.1763-16.el8

parent fde37e57
diff -up vim80/src/regexp_nfa.c.cve3796-fix vim80/src/regexp_nfa.c
--- vim80/src/regexp_nfa.c.cve3796-fix 2021-09-20 08:27:13.752604505 +0200
+++ vim80/src/regexp_nfa.c 2021-09-20 08:29:10.206546910 +0200
@@ -5493,7 +5493,8 @@ find_match_text(colnr_T startcol, int re
match = FALSE;
break;
}
- len2 += MB_CHAR2LEN(c2);
+ len2 += enc_utf8 ? utf_ptr2len(regline + col + len2)
+ : MB_CHAR2LEN(c2);
}
if (match
#ifdef FEAT_MBYTE
diff --git a/src/normal.c b/src/normal.c
index be0e75e..7d62e20 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -7147,19 +7147,23 @@ nv_replace(cmdarg_T *cap)
{
/*
* Get ptr again, because u_save and/or showmatch() will have
- * released the line. At the same time we let know that the
- * line will be changed.
+ * released the line. This may also happen in ins_copychar().
+ * At the same time we let know that the line will be changed.
*/
- ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE);
if (cap->nchar == Ctrl_E || cap->nchar == Ctrl_Y)
{
int c = ins_copychar(curwin->w_cursor.lnum
+ (cap->nchar == Ctrl_Y ? -1 : 1));
+
+ ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE);
if (c != NUL)
ptr[curwin->w_cursor.col] = c;
}
else
+ {
+ ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE);
ptr[curwin->w_cursor.col] = cap->nchar;
+ }
if (p_sm && msg_silent == 0)
showmatch(cap->nchar);
++curwin->w_cursor.col;
diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim
index 7278bcd..8818805 100644
--- a/src/testdir/test_edit.vim
+++ b/src/testdir/test_edit.vim
@@ -1387,3 +1387,15 @@ func Test_edit_quit()
only
endfunc
+" Test for getting the character of the line below after "p"
+func Test_edit_put_CTRL_E()
+ set encoding=latin1
+ new
+ let @" = ''
+ sil! norm orggRx
+ sil! norm pr
+ call assert_equal(['r', 'r'], getline(1, 2))
+ bwipe!
+ set encoding=utf-8
+endfunc
+
...@@ -20,87 +20,91 @@ ...@@ -20,87 +20,91 @@
%define baseversion 8.0 %define baseversion 8.0
%define vimdir vim80 %define vimdir vim80
Summary: The VIM editor Summary: The VIM editor
URL: http://www.vim.org/ URL: http://www.vim.org/
Name: vim Name: vim
Version: %{baseversion}.%{patchlevel} Version: %{baseversion}.%{patchlevel}
Release: 15%{?dist} Release: 16%{?dist}
License: Vim and MIT License: Vim and MIT
Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2 Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2
Source1: vim.sh Source1: vim.sh
Source2: vim.csh Source2: vim.csh
Source4: virc Source4: virc
Source5: vimrc Source5: vimrc
Source7: gvim16.png Source7: gvim16.png
Source8: gvim32.png Source8: gvim32.png
Source9: gvim48.png Source9: gvim48.png
Source10: gvim64.png Source10: gvim64.png
Source11: Changelog.rpm Source11: Changelog.rpm
%if %{withvimspell} %if %{withvimspell}
Source13: vim-spell-files.tar.bz2 Source13: vim-spell-files.tar.bz2
%endif %endif
Source14: spec-template Source14: spec-template
Source15: spec-template.new Source15: spec-template.new
Source16: macros.vim Source16: macros.vim
#Source17: ftplugin-spec.vim #Source17: ftplugin-spec.vim
#Source18: syntax-spec.vim #Source18: syntax-spec.vim
Patch2002: vim-7.0-fixkeys.patch Patch2002: vim-7.0-fixkeys.patch
Patch2003: vim-7.4-specsyntax.patch Patch2003: vim-7.4-specsyntax.patch
%if %{withhunspell} %if %{withhunspell}
Patch2011: vim-7.0-hunspell.patch Patch2011: vim-7.0-hunspell.patch
BuildRequires: hunspell-devel BuildRequires: hunspell-devel
%endif %endif
Patch3000: vim-7.4-syntax.patch Patch3000: vim-7.4-syntax.patch
Patch3002: vim-7.4-nowarnings.patch Patch3002: vim-7.4-nowarnings.patch
Patch3004: vim-7.0-rclocation.patch Patch3004: vim-7.0-rclocation.patch
Patch3006: vim-7.4-checkhl.patch Patch3006: vim-7.4-checkhl.patch
Patch3007: vim-7.4-fstabsyntax.patch Patch3007: vim-7.4-fstabsyntax.patch
Patch3008: vim-7.4-syncolor.patch Patch3008: vim-7.4-syncolor.patch
Patch3009: vim-7.0-specedit.patch Patch3009: vim-7.0-specedit.patch
Patch3010: vim-7.3-manpage-typo-668894-675480.patch Patch3010: vim-7.3-manpage-typo-668894-675480.patch
Patch3011: vim-manpagefixes-948566.patch Patch3011: vim-manpagefixes-948566.patch
Patch3012: vim-7.4-licensemacro-1151450.patch Patch3012: vim-7.4-licensemacro-1151450.patch
Patch3013: vim-7.4-globalsyntax.patch Patch3013: vim-7.4-globalsyntax.patch
Patch3014: vim-7.4-releasestring-1318991.patch Patch3014: vim-7.4-releasestring-1318991.patch
Patch3016: vim-8.0-copy-paste.patch Patch3016: vim-8.0-copy-paste.patch
# migrate shebangs in script to /usr/bin/python3 and use python2 when necessary # migrate shebangs in script to /usr/bin/python3 and use python2 when necessary
Patch3017: vim-python3-tests.patch Patch3017: vim-python3-tests.patch
# 1602727 - fixed several covscan issues and backported from upstream # 1602727 - fixed several covscan issues and backported from upstream
Patch3018: vim-covscan.patch Patch3018: vim-covscan.patch
# 1719812 - CVE-2019-12735 vim: vim/neovim: arbitrary command execution in getchar.c [rhel-8.1.0] # 1719812 - CVE-2019-12735 vim: vim/neovim: arbitrary command execution in getchar.c [rhel-8.1.0]
Patch3019: 0001-patch-8.1.1365-source-command-doesn-t-check-for-the-.patch Patch3019: 0001-patch-8.1.1365-source-command-doesn-t-check-for-the-.patch
# 1605095 - vim: should not re-implement crypto # 1605095 - vim: should not re-implement crypto
Patch3020: vim-crypto-warning.patch Patch3020: vim-crypto-warning.patch
# 1842755 - CVE-2019-20807 # 1842755 - CVE-2019-20807
Patch3021: 0001-patch-8.1.0881-can-execute-shell-commands-in-rvim-th.patch Patch3021: 0001-patch-8.1.0881-can-execute-shell-commands-in-rvim-th.patch
# 2004974 - CVE-2021-3796 vim: use-after-free in nv_replace() in normal.c [rhel-8.5.0]
Patch3022: vim-cve3796.patch
# 2004891 - CVE-2021-3778 vim: heap-based buffer overflow in utf_ptr2char() in mbyte.c [rhel-8.5.0]
Patch3023: vim-cve3778-fix.patch
# gcc is no longer in buildroot by default # gcc is no longer in buildroot by default
BuildRequires: gcc BuildRequires: gcc
BuildRequires: python2-devel python3-devel ncurses-devel gettext perl-devel BuildRequires: python2-devel python3-devel ncurses-devel gettext perl-devel
BuildRequires: perl-generators BuildRequires: perl-generators
BuildRequires: perl(ExtUtils::Embed) perl(ExtUtils::ParseXS) BuildRequires: perl(ExtUtils::Embed) perl(ExtUtils::ParseXS)
BuildRequires: libacl-devel gpm-devel autoconf file BuildRequires: libacl-devel gpm-devel autoconf file
# needed for appstream-util # needed for appstream-util
BuildRequires: libappstream-glib BuildRequires: libappstream-glib
%if %{WITH_SELINUX} %if %{WITH_SELINUX}
BuildRequires: libselinux-devel BuildRequires: libselinux-devel
%endif %endif
%if "%{withruby}" == "1" %if "%{withruby}" == "1"
BuildRequires: ruby-devel <= 2.5.5, ruby <= 2.5.5 BuildRequires: ruby-devel ruby
%endif %endif
%if "%{withlua}" == "1" %if "%{withlua}" == "1"
BuildRequires: lua-devel BuildRequires: lua-devel
%endif %endif
%if %{desktop_file} %if %{desktop_file}
# for /usr/bin/desktop-file-install # for /usr/bin/desktop-file-install
Requires: desktop-file-utils Requires: desktop-file-utils
BuildRequires: desktop-file-utils >= %{desktop_file_utils_version} BuildRequires: desktop-file-utils >= %{desktop_file_utils_version}
%endif %endif
Epoch: 2 Epoch: 2
Conflicts: filesystem < 3 Conflicts: filesystem < 3
%description %description
VIM (VIsual editor iMproved) is an updated and improved version of the VIM (VIsual editor iMproved) is an updated and improved version of the
...@@ -109,14 +113,14 @@ still very popular. VIM improves on vi by adding new features: ...@@ -109,14 +113,14 @@ still very popular. VIM improves on vi by adding new features:
multiple windows, multi-level undo, block highlighting and more. multiple windows, multi-level undo, block highlighting and more.
%package common %package common
Summary: The common files needed by any version of the VIM editor Summary: The common files needed by any version of the VIM editor
Conflicts: man-pages-fr < 0.9.7-14 Conflicts: man-pages-fr < 0.9.7-14
Conflicts: man-pages-it < 0.3.0-17 Conflicts: man-pages-it < 0.3.0-17
Conflicts: man-pages-pl < 0.24-2 Conflicts: man-pages-pl < 0.24-2
Requires: %{name}-filesystem Requires: %{name}-filesystem
# it conflicts with older version of vim-minimal during update because of manpage # it conflicts with older version of vim-minimal during update because of manpage
# move # move
Conflicts: %{name}-minimal < 8.0.1428-4 Conflicts: %{name}-minimal < 8.0.1428-4
%description common %description common
VIM (VIsual editor iMproved) is an updated and improved version of the VIM (VIsual editor iMproved) is an updated and improved version of the
...@@ -130,20 +134,20 @@ If you are installing vim-enhanced or vim-X11, you'll also need ...@@ -130,20 +134,20 @@ If you are installing vim-enhanced or vim-X11, you'll also need
to install the vim-common package. to install the vim-common package.
%package spell %package spell
Summary: The dictionaries for spell checking. This package is optional Summary: The dictionaries for spell checking. This package is optional
Requires: vim-common = %{epoch}:%{version}-%{release} Requires: vim-common = %{epoch}:%{version}-%{release}
%description spell %description spell
This subpackage contains dictionaries for vim spell checking in This subpackage contains dictionaries for vim spell checking in
many different languages. many different languages.
%package minimal %package minimal
Summary: A minimal version of the VIM editor Summary: A minimal version of the VIM editor
Provides: vi = %{version}-%{release} Provides: vi = %{version}-%{release}
Provides: %{_bindir}/vi Provides: %{_bindir}/vi
# it conflicts with older version of vim-common during update because of manpage # it conflicts with older version of vim-common during update because of manpage
# move # move
Conflicts: %{name}-common < 8.0.1428-4 Conflicts: %{name}-common < 8.0.1428-4
%description minimal %description minimal
VIM (VIsual editor iMproved) is an updated and improved version of the VIM (VIsual editor iMproved) is an updated and improved version of the
...@@ -156,21 +160,21 @@ present. NOTE: The online help is only available when the vim-common ...@@ -156,21 +160,21 @@ present. NOTE: The online help is only available when the vim-common
package is installed. package is installed.
%package enhanced %package enhanced
Summary: A version of the VIM editor which includes recent enhancements Summary: A version of the VIM editor which includes recent enhancements
Requires: vim-common = %{epoch}:%{version}-%{release} which Requires: vim-common = %{epoch}:%{version}-%{release} which
Provides: vim = %{version}-%{release} Provides: vim = %{version}-%{release}
Provides: %{_bindir}/mergetool Provides: %{_bindir}/mergetool
Provides: %{_bindir}/vim Provides: %{_bindir}/vim
# suggest python3, python2, lua, ruby and perl packages because of their # suggest python3, python2, lua, ruby and perl packages because of their
# embedded functionality in Vim/GVim # embedded functionality in Vim/GVim
Suggests: python2 python2-libs Suggests: python2 python2-libs
Suggests: python3 python3-libs Suggests: python3 python3-libs
Suggests: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) perl-libs perl-devel Suggests: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) perl-libs perl-devel
%if "%{withruby}" == "1" %if "%{withruby}" == "1"
Suggests: ruby-libs ruby Suggests: ruby-libs ruby
%endif %endif
%if "%{withlua}" == "1" %if "%{withlua}" == "1"
Suggests: lua-libs Suggests: lua-libs
%endif %endif
%description enhanced %description enhanced
...@@ -187,39 +191,39 @@ interpreters for the Python and Perl scripting languages. You'll also ...@@ -187,39 +191,39 @@ interpreters for the Python and Perl scripting languages. You'll also
need to install the vim-common package. need to install the vim-common package.
%package filesystem %package filesystem
Summary: VIM filesystem layout Summary: VIM filesystem layout
BuildArch: noarch BuildArch: noarch
%Description filesystem %Description filesystem
This package provides some directories which are required by other This package provides some directories which are required by other
packages that add vim files, p.e. additional syntax files or filetypes. packages that add vim files, p.e. additional syntax files or filetypes.
%package X11 %package X11
Summary: The VIM version of the vi editor for the X Window System - GVim Summary: The VIM version of the vi editor for the X Window System - GVim
# needed in configure script to have correct macros enabled (#1602807) # needed in configure script to have correct macros enabled (#1602807)
BuildRequires: gtk3-devel BuildRequires: gtk3-devel
BuildRequires: libX11-devel BuildRequires: libX11-devel
BuildRequires: libSM-devel BuildRequires: libSM-devel
BuildRequires: libXt-devel BuildRequires: libXt-devel
BuildRequires: libXpm-devel BuildRequires: libXpm-devel
BuildRequires: libICE-devel BuildRequires: libICE-devel
Requires: vim-common = %{epoch}:%{version}-%{release} libattr >= 2.4 gtk3 Requires: vim-common = %{epoch}:%{version}-%{release} libattr >= 2.4 gtk3
Provides: gvim = %{version}-%{release} Provides: gvim = %{version}-%{release}
Provides: %{_bindir}/mergetool Provides: %{_bindir}/mergetool
Provides: %{_bindir}/gvim Provides: %{_bindir}/gvim
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: hicolor-icon-theme Requires: hicolor-icon-theme
# suggest python3, python2, lua, ruby and perl packages because of their # suggest python3, python2, lua, ruby and perl packages because of their
# embedded functionality in Vim/GVim # embedded functionality in Vim/GVim
Suggests: python2 python2-libs Suggests: python2 python2-libs
Suggests: python3 python3-libs Suggests: python3 python3-libs
Suggests: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) perl-libs perl-devel Suggests: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) perl-libs perl-devel
%if "%{withruby}" == "1" %if "%{withruby}" == "1"
Suggests: ruby-libs ruby Suggests: ruby-libs ruby
%endif %endif
%if "%{withlua}" == "1" %if "%{withlua}" == "1"
Suggests: lua-libs Suggests: lua-libs
%endif %endif
%description X11 %description X11
...@@ -273,6 +277,8 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk ...@@ -273,6 +277,8 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk
%patch3019 -p1 -b .cve %patch3019 -p1 -b .cve
%patch3020 -p1 -b .crypto-warning %patch3020 -p1 -b .crypto-warning
%patch3021 -p1 -b .rvim %patch3021 -p1 -b .rvim
%patch3022 -p1 -b .cve3796
%patch3023 -p1 -b .cve3778
%build %build
%if 0%{?rhel} > 7 %if 0%{?rhel} > 7
...@@ -433,8 +439,8 @@ cat > $RPM_BUILD_ROOT%{_datadir}/metainfo/gvim.appdata.xml <<EOF ...@@ -433,8 +439,8 @@ cat > $RPM_BUILD_ROOT%{_datadir}/metainfo/gvim.appdata.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2014 Richard Hughes <richard@hughsie.com> --> <!-- Copyright 2014 Richard Hughes <richard@hughsie.com> -->
<!-- <!--
EmailAddress: Bram@moolenaar.net> EmailAddress: Bram@moolenaar.net>
SentUpstream: 2014-05-22 SentUpstream: 2014-05-22
--> -->
<application> <application>
<id type="desktop">gvim.desktop</id> <id type="desktop">gvim.desktop</id>
...@@ -791,8 +797,9 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags ...@@ -791,8 +797,9 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags
%{_datadir}/icons/locolor/*/apps/* %{_datadir}/icons/locolor/*/apps/*
%changelog %changelog
* Sun Apr 11 2021 Mustafa Gezen <mustafa@rockylinux.org> - 8.0.1763-15 * Mon Sep 20 2021 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-16
- Specify Ruby version to a compatible one - 2004974 - CVE-2021-3796 vim: use-after-free in nv_replace() in normal.c [rhel-8.5.0]
- 2004891 - CVE-2021-3778 vim: heap-based buffer overflow in utf_ptr2char() in mbyte.c [rhel-8.5.0]
* Tue Jun 02 2020 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-15 * Tue Jun 02 2020 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-15
- 1842755 - CVE-2019-20807 - 1842755 - CVE-2019-20807
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment