import UBI vim-8.0.1763-21.el8_10

This commit is contained in:
eabdullin 2025-10-11 23:12:02 +00:00
parent 86dde19991
commit a2b7606273
10 changed files with 1220 additions and 17 deletions

4
.gitignore vendored
View File

@ -1,3 +1,5 @@
SOURCES/Changelog.rpm SOURCES/gvim16.png
SOURCES/gvim32.png
SOURCES/gvim48.png
SOURCES/gvim64.png SOURCES/gvim64.png
SOURCES/vim-8.0-1763.tar.bz2 SOURCES/vim-8.0-1763.tar.bz2

View File

@ -1,3 +1,5 @@
5ea81545fc28b57c490d25bda67a63a2838dd25b SOURCES/Changelog.rpm a7c81ffd40611b19c125c505699d8a6401f6e022 SOURCES/gvim16.png
2356345378a9f1ba3c9e9e6508b695611e8f2cfa SOURCES/gvim32.png
37ad682f67539da7f4d4b7316383115dfe43222d SOURCES/gvim48.png
c32bd520a1498b71ee9bbcddc7ad05df1565d085 SOURCES/gvim64.png c32bd520a1498b71ee9bbcddc7ad05df1565d085 SOURCES/gvim64.png
6716ebb416c9da91d16a2b17dc6bc2cecf65b4eb SOURCES/vim-8.0-1763.tar.bz2 6716ebb416c9da91d16a2b17dc6bc2cecf65b4eb SOURCES/vim-8.0-1763.tar.bz2

View File

@ -0,0 +1,70 @@
diff -up vim82/runtime/autoload/zip.vim.CVE-2025-53906 vim82/runtime/autoload/zip.vim
--- vim82/runtime/autoload/zip.vim.CVE-2025-53906 2021-03-22 10:02:41.000000000 +0100
+++ vim82/runtime/autoload/zip.vim 2025-09-10 19:33:11.491115978 +0200
@@ -251,6 +251,7 @@ fun! zip#Write(fname)
" call Dfunc("zip#Write(fname<".a:fname.">) zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
let repkeep= &report
set report=10
+ let need_rename = 0
" sanity checks
if !executable(substitute(g:zip_zipcmd,'\s\+.*$','',''))
@@ -261,14 +262,6 @@ fun! zip#Write(fname)
" call Dret("zip#Write")
return
endif
- if !exists("*mkdir")
- redraw!
- echohl Error | echo "***error*** (zip#Write) sorry, mkdir() doesn't work on your system" | echohl None
-" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
- let &report= repkeep
-" call Dret("zip#Write")
- return
- endif
let curdir= getcwd()
let tmpdir= tempname()
@@ -302,6 +295,11 @@ fun! zip#Write(fname)
let zipfile = substitute(a:fname,'^.\{-}zipfile:\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'^.\{-}zipfile:.\{-}::\([^\\].*\)$','\1','')
endif
+ if fname =~ '^[.]\{1,2}/'
+ call system(g:zip_zipcmd." -d ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
+ let fname = substitute(fname, '^\([.]\{1,2}/\)\+', '', 'g')
+ let need_rename = 1
+ endif
" call Decho("zipfile<".zipfile.">")
" call Decho("fname <".fname.">")
@@ -318,7 +316,7 @@ fun! zip#Write(fname)
endif
" call Decho("zipfile<".zipfile."> fname<".fname.">")
- exe "w! ".fnameescape(fname)
+ exe "w ".fnameescape(fname)
if has("win32unix") && executable("cygpath")
let zipfile = substitute(system("cygpath ".s:Escape(zipfile,0)),'\n','','e')
endif
@@ -348,6 +346,10 @@ fun! zip#Write(fname)
let &binary = binkeep
q!
unlet s:zipfile_{winnr()}
+ elseif need_rename
+ sil exe 'keepalt file '.fnameescape("zipfile://".zipfile.'::'.fname)
+ redraw!
+ echohl Error | echo "***error*** (zip#Browse) Path Traversal Attack detected, dropping relative path" | echohl None
endif
" cleanup and restore current directory
@@ -383,6 +385,11 @@ fun! zip#Extract()
let &report= repkeep
" call Dret("zip#Extract")
return
+ elseif fname =~ '^[.]\?[.]/'
+ redraw!
+ echohl Error | echo "***error*** (zip#Browse) Path Traversal Attack detected, not extracting!" | echohl None
+ let &report= repkeep
+ return
endif
" extract the file mentioned under the cursor

View File

@ -0,0 +1,288 @@
diff --git a/runtime/autoload/tar.vim b/runtime/autoload/tar.vim
index 9c518cb..e320b9a 100644
--- a/runtime/autoload/tar.vim
+++ b/runtime/autoload/tar.vim
@@ -37,10 +37,10 @@ set cpo&vim
" ---------------------------------------------------------------------
" Default Settings: {{{1
if !exists("g:tar_browseoptions")
- let g:tar_browseoptions= "Ptf"
+ let g:tar_browseoptions= "tf"
endif
if !exists("g:tar_readoptions")
- let g:tar_readoptions= "OPxf"
+ let g:tar_readoptions= "Oxf"
endif
if !exists("g:tar_cmd")
let g:tar_cmd= "tar"
@@ -95,6 +95,9 @@ if !exists("g:tar_shq")
" call Decho("g:tar_shq<".g:tar_shq.">")
endif
+let g:tar_secure=' -- '
+let g:tar_leading_pat='^\%([.]\{,2\}/\)\+'
+
" ----------------
" Functions: {{{1
" ----------------
@@ -195,6 +198,15 @@ fun! tar#Browse(tarfile)
return
endif
+ " remove tar: Removing leading '/' from member names
+ " Note: the message could be localized
+ if search('^tar: ') > 0 || search(g:tar_leading_pat) > 0
+ call append(3,'" Note: Path Traversal Attack detected!')
+ let b:leading_slash = 1
+ " remove the message output
+ sil g/^tar: /d
+ endif
+
setlocal noma nomod ro
noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
@@ -211,12 +223,7 @@ fun! s:TarBrowseSelect()
let fname= getline(".")
" call Decho("fname<".fname.">")
- if !exists("g:tar_secure") && fname =~ '^\s*-\|\s\+-'
- redraw!
- echohl WarningMsg | echo '***warning*** (tar#BrowseSelect) rejecting tarfile member<'.fname.'> because of embedded "-"'
-" call Dret('tar#BrowseSelect : rejecting tarfile member<'.fname.'> because of embedded "-"')
- return
- endif
+ let ls= get(b:, 'leading_slash', 0)
" sanity check
if fname =~ '^"'
@@ -238,7 +245,8 @@ fun! s:TarBrowseSelect()
wincmd _
endif
let s:tblfile_{winnr()}= curfile
- call tar#Read("tarfile:".tarfile.'::'.fname,1)
+ let b:leading_slash= ls
+ call tar#Read("tarfile:".tarfile.'::'.fname)
filetype detect
set nomod
exe 'com! -buffer -nargs=? -complete=file TarDiff :call tar#Diff(<q-args>,"'.fnameescape(fname).'")'
@@ -249,8 +257,8 @@ endfun
" ---------------------------------------------------------------------
" tar#Read: {{{2
-fun! tar#Read(fname,mode)
-" call Dfunc("tar#Read(fname<".a:fname.">,mode=".a:mode.")")
+fun! tar#Read(fname)
+" call Dfunc("tar#Read(fname<".a:fname.">)")
let repkeep= &report
set report=10
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\)::.*$','\1','')
@@ -262,6 +270,8 @@ fun! tar#Read(fname,mode)
" call Decho("tarfile<".tarfile.">")
" call Decho("fname<".fname.">")
+ let curdir= getcwd()
+ let b:curdir= curdir
if fname =~ '\.bz2$' && executable("bzcat")
let decmp= "|bzcat"
let doro = 1
@@ -282,33 +292,31 @@ fun! tar#Read(fname,mode)
endif
endif
- if exists("g:tar_secure")
- let tar_secure= " -- "
- else
- let tar_secure= " "
- endif
if tarfile =~# '\.bz2$'
-" call Decho("7: exe silent r! bzip2 -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
- exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
+" call Decho("7: exe silent r! bzip2 -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp)
+ exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
elseif tarfile =~# '\.\(gz\|tgz\)$'
-" call Decho("5: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.tar_secure.shellescape(fname,1))
- exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
+" call Decho("5: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.g:tar_secure.shellescape(fname,1))
+ exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
elseif tarfile =~# '\.lrp$'
-" call Decho("6: exe silent r! cat ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
- exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
+" call Decho("6: exe silent r! cat ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp)
+ exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
elseif tarfile =~# '\.lzma$'
-" call Decho("7: exe silent r! lzma -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
- exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
+" call Decho("7: exe silent r! lzma -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp)
+ exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
elseif tarfile =~# '\.\(xz\|txz\)$'
-" call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
- exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
+" call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp)
+ exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
else
if tarfile =~ '^\s*-'
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
let tarfile = substitute(tarfile, '-', './-', '')
endif
-" call Decho("8: exe silent r! ".g:tar_cmd." -".g:tar_readoptions.tar_secure.shellescape(tarfile,1)." ".shellescape(fname,1).decmp)
- exe "silent r! ".g:tar_cmd." -".g:tar_readoptions.shellescape(tarfile,1)." ".tar_secure.shellescape(fname,1).decmp
+" call Decho("8: exe silent r! ".g:tar_cmd." -".g:tar_readoptions.g:tar_secure.shellescape(tarfile,1)." ".shellescape(fname,1).decmp)
+ exe "silent r! ".g:tar_cmd." -".g:tar_readoptions.shellescape(tarfile,1)." ".g:tar_secure.shellescape(fname,1).decmp
+ endif
+ if get(b:, 'leading_slash', 0)
+ sil g/^tar: /d
endif
if doro
@@ -317,13 +325,14 @@ fun! tar#Read(fname,mode)
endif
let b:tarfile= a:fname
- exe "file tarfile::".fnameescape(fname)
" cleanup
keepj sil! 0d
set nomod
let &report= repkeep
+ exe "lcd ".fnameescape(curdir)
+ silent exe "file tarfile::".fnameescape(fname)
" call Dret("tar#Read : b:tarfile<".b:tarfile.">")
endfun
@@ -334,13 +343,6 @@ fun! tar#Write(fname)
let repkeep= &report
set report=10
- if !exists("g:tar_secure") && a:fname =~ '^\s*-\|\s\+-'
- redraw!
- echohl WarningMsg | echo '***warning*** (tar#Write) rejecting tarfile member<'.a:fname.'> because of embedded "-"'
-" call Dret('tar#Write : rejecting tarfile member<'.fname.'> because of embedded "-"')
- return
- endif
-
" sanity checks
if !executable(g:tar_cmd)
redraw!
@@ -389,6 +391,13 @@ fun! tar#Write(fname)
let tarfile = substitute(b:tarfile,'tarfile:\(.\{-}\)::.*$','\1','')
let fname = substitute(b:tarfile,'tarfile:.\{-}::\(.*\)$','\1','')
+ if get(b:, 'leading_slash', 0)
+ redraw!
+ echohl Error | echo "***error*** (tar#Write) sorry, not attempting to update ".tarfile." with ".fname | echohl None
+ let &report= repkeep
+ return
+ endif
+
" handle compressed archives
if tarfile =~# '\.bz2'
call system("bzip2 -d -- ".shellescape(tarfile,0))
@@ -442,27 +451,23 @@ fun! tar#Write(fname)
endif
" call Decho("tarfile<".tarfile."> fname<".fname.">")
- if exists("g:tar_secure")
- let tar_secure= " -- "
- else
- let tar_secure= " "
- endif
- exe "w! ".fnameescape(fname)
+ " don't overwrite a file forcefully
+ exe "w ".fnameescape(fname)
if has("win32unix") && executable("cygpath")
let tarfile = substitute(system("cygpath ".shellescape(tarfile,0)),'\n','','e')
endif
" delete old file from tarfile
" call Decho("system(".g:tar_cmd." --delete -f ".shellescape(tarfile,0)." -- ".shellescape(fname,0).")")
- call system(g:tar_cmd." --delete -f ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
+ call system(g:tar_cmd." --delete -f ".shellescape(tarfile,0).g:tar_secure.shellescape(fname,0))
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
else
" update tarfile with new file
-" call Decho(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
- call system(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
+" call Decho(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).g:tar_secure.shellescape(fname,0))
+ call system(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).g:tar_secure.shellescape(fname,0))
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
@@ -511,6 +516,7 @@ fun! tar#Diff(userfname,fname)
if a:userfname != ""
let fname= a:userfname
endif
+ exe "lcd ".fnameescape(b:tmpdir). '/_ZIPVIM_'
if filereadable(fname)
" sets current file (from tarball) for diff'ing
" splits window vertically
diff --git a/runtime/doc/pi_tar.txt b/runtime/doc/pi_tar.txt
index 1b03d31..a6c72cd 100644
--- a/runtime/doc/pi_tar.txt
+++ b/runtime/doc/pi_tar.txt
@@ -61,7 +61,7 @@ Copyright 2005-2012: *tar-copyright*
the file mentioned in the tarball. If the current directory is not
correct for that path, :TarDiff will fail to find the associated file.
- If the [filename] is given, that that filename (and path) will be used
+ If the [filename] is given, that filename (and path) will be used
to specify the associated file.
@@ -86,18 +86,6 @@ Copyright 2005-2012: *tar-copyright*
*g:tar_readoptions* "OPxf" used to extract a file from a tarball
*g:tar_cmd* "tar" the name of the tar program
*g:tar_nomax* 0 if true, file window will not be maximized
- *g:tar_secure* undef if exists:
- "--"s will be used to prevent unwanted
- option expansion in tar commands.
- Please be sure that your tar command
- accepts "--"; Posix compliant tar
- utilities do accept them.
- if not exists:
- The tar plugin will reject any tar
- files or member files that begin with
- "-"
- Not all tar's support the "--" which is why
- it isn't default.
*g:tar_writeoptions* "uf" used to update/replace a file
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 5895c05..2e09b72 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -6517,7 +6517,6 @@ g:tar_copycmd pi_tar.txt /*g:tar_copycmd*
g:tar_extractcmd pi_tar.txt /*g:tar_extractcmd*
g:tar_nomax pi_tar.txt /*g:tar_nomax*
g:tar_readoptions pi_tar.txt /*g:tar_readoptions*
-g:tar_secure pi_tar.txt /*g:tar_secure*
g:tar_writeoptions pi_tar.txt /*g:tar_writeoptions*
g:terminal_ansi_colors terminal.txt /*g:terminal_ansi_colors*
g:tex_comment_nospell syntax.txt /*g:tex_comment_nospell*
diff --git a/runtime/plugin/tarPlugin.vim b/runtime/plugin/tarPlugin.vim
index 6d9e6bd..471712f 100644
--- a/runtime/plugin/tarPlugin.vim
+++ b/runtime/plugin/tarPlugin.vim
@@ -22,14 +22,14 @@ set cpo&vim
" Public Interface: {{{1
augroup tar
au!
- au BufReadCmd tarfile::* call tar#Read(expand("<amatch>"), 1)
- au FileReadCmd tarfile::* call tar#Read(expand("<amatch>"), 0)
+ au BufReadCmd tarfile::* call tar#Read(expand("<amatch>"))
+ au FileReadCmd tarfile::* call tar#Read(expand("<amatch>"))
au BufWriteCmd tarfile::* call tar#Write(expand("<amatch>"))
au FileWriteCmd tarfile::* call tar#Write(expand("<amatch>"))
if has("unix")
- au BufReadCmd tarfile::*/* call tar#Read(expand("<amatch>"), 1)
- au FileReadCmd tarfile::*/* call tar#Read(expand("<amatch>"), 0)
+ au BufReadCmd tarfile::*/* call tar#Read(expand("<amatch>"))
+ au FileReadCmd tarfile::*/* call tar#Read(expand("<amatch>"))
au BufWriteCmd tarfile::*/* call tar#Write(expand("<amatch>"))
au FileWriteCmd tarfile::*/* call tar#Write(expand("<amatch>"))
endif

430
SOURCES/Changelog.rpm Normal file
View File

@ -0,0 +1,430 @@
* Tue Aug 28 2012 Karsten Hopp <karsten@redhat.com> 7.3.638-1
- patchlevel 638
* Mon Aug 06 2012 Karsten Hopp <karsten@redhat.com> 2:7.3.622-2
- add epoch to spec.vim and automatic changelog entries
* Mon Aug 06 2012 Karsten Hopp <karsten@redhat.com> 7.3.622-1
- patchlevel 622
* Mon Aug 06 2012 Karsten Hopp <karsten@redhat.com> 7.3.604-1
- drop vim-6.1-rh3.patch, (bz #754801)
* Wed Jul 18 2012 Karsten Hopp <karsten@redhat.com> 7.3.604-1
- patchlevel 604
* Wed Jul 11 2012 Petr Pisar <ppisar@redhat.com> - 2:7.3.594-2
- Perl 5.16 rebuild
* Tue Jul 10 2012 Karsten Hopp <karsten@redhat.com> 7.3.594-1
- patchlevel 594
* Tue Jul 10 2012 Karsten Hopp <karsten@redhat.com> 7.3.592-1
- patchlevel 592
* Mon Jul 09 2012 Petr Pisar <ppisar@redhat.com> - 2:7.3.584-2
- Perl 5.16 rebuild
* Mon Jul 02 2012 Karsten Hopp <karsten@redhat.com> 7.3.584-1
- patchlevel 584
* Thu Jun 28 2012 Petr Pisar <ppisar@redhat.com> - 2:7.3.556-2
- Perl 5.16 rebuild
* Mon Jun 18 2012 Karsten Hopp <karsten@redhat.com> 7.3.556-1
- patchlevel 556
* Mon Jun 11 2012 Petr Pisar <ppisar@redhat.com> - 2:7.3.515-2
- Perl 5.16 rebuild
* Mon May 21 2012 Karsten Hopp <karsten@redhat.com> 7.3.515-1
- enable highlighting for older log files (#816848)
* Tue May 08 2012 Karsten Hopp <karsten@redhat.com> 7.3.515-1
- patchlevel 515
* Fri Mar 16 2012 Karsten Hopp <karsten@redhat.com> 7.3.471-1
- patchlevel 471
* Mon Feb 13 2012 Karsten Hopp <karsten@redhat.com> 7.3.444-1
- patchlevel 444
* Tue Feb 07 2012 Karsten Hopp <karsten@redhat.com> 7.3.434-1
- patchlevel 434
* Tue Feb 07 2012 Karsten Hopp <karsten@redhat.com> 7.3.393-3
- update spec file template, bugzilla 736774
* Thu Jan 26 2012 Harald Hoyer <harald@redhat.com> 7.3.393-3
- rebuild against the new ruby library
* Thu Jan 26 2012 Harald Hoyer <harald@redhat.com> 7.3.393-2
- install everything in /usr
https://fedoraproject.org/wiki/Features/UsrMove
* Thu Jan 05 2012 Karsten Hopp <karsten@redhat.com> 7.3.393-1
- patchlevel 393
- fix boolean key 'Terminal' in gvim.desktop
* Fri Dec 23 2011 Karsten Hopp <karsten@redhat.com> 7.3.386-1
- patchlevel 386
* Mon Sep 26 2011 Karsten Hopp <karsten@redhat.com> 7.3.322-1
- patchlevel 322
* Wed Sep 21 2011 Karsten Hopp <karsten@redhat.com> 7.3.315-1
- patchlevel 315
* Mon Aug 29 2011 Karsten Hopp <karsten@redhat.com> 7.3.289-1
- patchlevel 289
* Mon Aug 29 2011 Karsten Hopp <karsten@redhat.com> 7.3.244-4
- Remove old patched files. (Ricky Zhou <ricky@fedoraproject.org>)
(bugzilla #709456)
* Thu Jul 21 2011 Petr Sabata <contyk@redhat.com> - 2:7.3.244-3
- Perl mass rebuild
* Thu Jul 21 2011 Petr Sabata <contyk@redhat.com> - 2:7.3.244-2
- Perl mass rebuild
* Mon Jul 11 2011 Karsten Hopp <karsten@redhat.com> 7.3.244-1
- patchlevel 244
* Tue Jun 14 2011 Marcela Mašláňová <mmaslano@redhat.com> - 2:7.3.206-3
- Perl mass rebuild
* Tue May 31 2011 Ville Skyttä <ville.skytta@iki.fi> - 2:7.3.206-2
- Own the /usr/share/vim/vim73 dir.
* Mon May 30 2011 Karsten Hopp <karsten@redhat.com> 7.3.206-1
- drop xxd-locale patch
- update to patchlevel 206
* Wed May 11 2011 Karsten Hopp <karsten@redhat.com> 7.3.189-1
- patchlevel 189
* Wed Mar 16 2011 Karsten Hopp <karsten@redhat.com> 7.3.138-1
- patchlevel 138
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:7.3.107-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Jan 24 2011 Karsten Hopp <karsten@redhat.com> 7.3.107-1
- patchlevel 107
* Mon Jan 10 2011 Karsten Hopp <karsten@redhat.com> 7.3.099-1
- patchlevel 099
* Mon Jan 03 2011 Karsten Hopp <karsten@redhat.com> 7.3.094-1
- patchlevel 094
* Thu Dec 09 2010 Karsten Hopp <karsten@redhat.com> 7.3.081-1
- patchlevel 081
* Wed Dec 08 2010 Karsten Hopp <karsten@redhat.com> 7.3.080-1
- patchlevel 080
* Fri Dec 03 2010 Karsten Hopp <karsten@redhat.com> 7.3.075-1
- patchlevel 075
* Thu Dec 02 2010 Karsten Hopp <karsten@redhat.com> 7.3.073-1
- patchlevel 073
* Thu Nov 25 2010 Karsten Hopp <karsten@redhat.com> 7.3.069-1
- patchlevel 069
* Wed Nov 24 2010 Karsten Hopp <karsten@redhat.com> 7.3.068-1
- patchlevel 068
* Wed Nov 24 2010 Karsten Hopp <karsten@redhat.com> 7.3.063-1
- patchlevel 063
* Wed Nov 17 2010 Karsten Hopp <karsten@redhat.com> 7.3.062-1
- patchlevel 062
* Tue Nov 16 2010 Karsten Hopp <karsten@redhat.com> 7.3.061-1
- patchlevel 061
* Tue Nov 16 2010 Karsten Hopp <karsten@redhat.com> 7.3.056-1
- patchlevel 056
* Thu Nov 11 2010 Karsten Hopp <karsten@redhat.com> 7.3.055-1
- patchlevel 055
* Wed Nov 10 2010 Karsten Hopp <karsten@redhat.com> 7.3.051-1
- patchlevel 051
* Thu Nov 04 2010 Karsten Hopp <karsten@redhat.com> 7.3.050-1
- patchlevel 050
* Thu Nov 04 2010 Karsten Hopp <karsten@redhat.com> 7.3.048-1
- patchlevel 048
* Thu Oct 28 2010 Karsten Hopp <karsten@redhat.com> 7.3.047-1
- patchlevel 047
* Wed Oct 27 2010 Karsten Hopp <karsten@redhat.com> 7.3.046-1
- patchlevel 046
* Wed Oct 27 2010 Karsten Hopp <karsten@redhat.com> 7.3.039-1
- patchlevel 039
* Sun Oct 24 2010 Karsten Hopp <karsten@redhat.com> 7.3.035-1
- patchlevel 035
* Sat Oct 23 2010 Karsten Hopp <karsten@redhat.com> 7.3.034-1
- patchlevel 034
* Sat Oct 23 2010 Karsten Hopp <karsten@redhat.com> 7.3.033-1
- patchlevel 033
* Thu Oct 21 2010 Karsten Hopp <karsten@redhat.com> 7.3.032-1
- patchlevel 032
* Wed Oct 20 2010 Karsten Hopp <karsten@redhat.com> 7.3.031-1
- patchlevel 031
* Sat Oct 16 2010 Karsten Hopp <karsten@redhat.com> 7.3.029-1
- patchlevel 029
* Fri Oct 15 2010 Karsten Hopp <karsten@redhat.com> 7.3.028-1
- patchlevel 028
* Thu Oct 14 2010 Karsten Hopp <karsten@redhat.com> 7.3.027-1
- patchlevel 027
* Wed Oct 13 2010 Karsten Hopp <karsten@redhat.com> 7.3.026-1
- patchlevel 026
* Sun Oct 10 2010 Karsten Hopp <karsten@redhat.com> 7.3.021-1
- patchlevel 021
* Sat Oct 09 2010 Karsten Hopp <karsten@redhat.com> 7.3.020-1
- patchlevel 020
* Fri Oct 01 2010 Karsten Hopp <karsten@redhat.com> 7.3.019-1
- patchlevel 019
* Thu Sep 30 2010 Karsten Hopp <karsten@redhat.com> 7.3.018-1
- patchlevel 018
* Thu Sep 30 2010 Karsten Hopp <karsten@redhat.com> 7.3.011-3
- add filesystem subpackage (#628293)
* Wed Sep 29 2010 jkeating - 2:7.3.011-2
- Rebuilt for gcc bug 634757
* Wed Sep 22 2010 Karsten Hopp <karsten@redhat.com> 7.3.011-1
- update to VIM 7.3 patchlevel 011
# vim:nrformats-=octal
* Tue Jul 27 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> 7.2.446-2
- Rebuild against python 2.7
* Tue Jul 13 2010 Karsten Hopp <karsten@redhat.com> 7.2.446-1
- patchlevel 446
* Thu Jul 08 2010 Karsten Hopp <karsten@redhat.com> 7.2.445-1
- patchlevel 445
* Wed Jun 23 2010 Karsten Hopp <karsten@redhat.com> 7.2.444-2
- rebuild with perl-5.12
* Sun Jun 13 2010 Karsten Hopp <karsten@redhat.com> 7.2.444-1
- patchlevel 444
* Sun Jun 13 2010 Karsten Hopp <karsten@redhat.com> 7.2.443-1
- patchlevel 443
* Sat Jun 05 2010 Karsten Hopp <karsten@redhat.com> 7.2.442-1
- patchlevel 442
* Wed Jun 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 2:7.2.441-2
- Mass rebuild with perl-5.12.0
* Sun May 30 2010 Karsten Hopp <karsten@redhat.com> 7.2.441-1
- patchlevel 441
* Sat May 29 2010 Karsten Hopp <karsten@redhat.com> 7.2.440-1
- patchlevel 440
* Wed May 26 2010 Karsten Hopp <karsten@redhat.com> 7.2.438-1
- patchlevel 438
* Sat May 22 2010 Karsten Hopp <karsten@redhat.com> 7.2.437-1
- patchlevel 437
* Sun May 16 2010 Karsten Hopp <karsten@redhat.com> 7.2.436-1
- patchlevel 436
* Sat May 15 2010 Karsten Hopp <karsten@redhat.com> 7.2.433-1
- patchlevel 433
* Fri May 14 2010 Karsten Hopp <karsten@redhat.com> 7.2.427-1
- patchlevel 427
* Thu May 13 2010 Karsten Hopp <karsten@redhat.com> 7.2.422-1
- patchlevel 422
* Fri May 07 2010 Karsten Hopp <karsten@redhat.com> 7.2.416-1
- patchlevel 416
* Tue Apr 20 2010 Karsten Hopp <karsten@redhat.com> 7.2.411-2
- fix rvim manpage (#583180)
* Wed Mar 24 2010 Karsten Hopp <karsten@redhat.com> 7.2.411-1
- patchlevel 411
* Tue Mar 23 2010 Karsten Hopp <karsten@redhat.com> 7.2.410-1
- patchlevel 410
* Sat Mar 20 2010 Karsten Hopp <karsten@redhat.com> 7.2.403-1
- patchlevel 403
* Thu Mar 18 2010 Karsten Hopp <karsten@redhat.com> 7.2.402-1
- patchlevel 402
* Wed Mar 17 2010 Karsten Hopp <karsten@redhat.com> 7.2.399-1
- patchlevel 399
* Wed Mar 10 2010 Karsten Hopp <karsten@redhat.com> 7.2.394-1
- patchlevel 394
* Wed Mar 03 2010 Karsten Hopp <karsten@redhat.com> 7.2.385-1
- patchlevel 385
* Tue Mar 02 2010 Karsten Hopp <karsten@redhat.com> 7.2.384-1
- patchlevel 384
* Tue Mar 02 2010 Karsten Hopp <karsten@redhat.com> 7.2.381-1
- patchlevel 381
* Sat Feb 27 2010 Karsten Hopp <karsten@redhat.com> 7.2.377-1
- patchlevel 377
* Wed Feb 24 2010 Karsten Hopp <karsten@redhat.com> 7.2.376-1
- patchlevel 376
* Thu Feb 18 2010 Karsten Hopp <karsten@redhat.com> 7.2.368-1
- patchlevel 368
* Thu Feb 18 2010 Karsten Hopp <karsten@redhat.com> 7.2.367-1
- patchlevel 367
* Wed Feb 17 2010 Karsten Hopp <karsten@redhat.com> 7.2.365-1
- patchlevel 365
* Fri Feb 12 2010 Karsten Hopp <karsten@redhat.com> 7.2.359-1
- patchlevel 359
* Thu Feb 11 2010 Karsten Hopp <karsten@redhat.com> 7.2.357-1
- patchlevel 357
* Thu Feb 04 2010 Karsten Hopp <karsten@redhat.com> 7.2.356-1
- patchlevel 356
* Wed Feb 03 2010 Karsten Hopp <karsten@redhat.com> 7.2.354-1
- patchlevel 354
* Fri Jan 29 2010 Karsten Hopp <karsten@redhat.com> 7.2.351-1
- patchlevel 351
* Thu Jan 28 2010 Karsten Hopp <karsten@redhat.com> 7.2.350-1
- patchlevel 350
* Mon Dec 7 2009 Stepan Kasal <skasal@redhat.com> - 2:7.2.315-2
- rebuild against perl 5.10.1
* Wed Dec 03 2009 Karsten Hopp <karsten@redhat.com> 7.2.315-1
- patchlevel 315
- fix vimrc location in man page (#456992)
- correct syntax highlighting of httpd config files in /etc/httpd (#499123)
- Buildrequire ruby, ruby-devel (#503872)
- Remove check for static gravity (#510307)
- sort tags file (#517725)
- use one gvim to open multiple file selections from nautilus (#519265)
- use elinks -source instead of elinks -dump (#518791)
- add ext4 keyword to /etc/fstab syntax highlighting (#498290)
* Mon Nov 09 2009 Karsten Hopp <karsten@redhat.com> 7.2.284-1
- patchlevel 284
* Thu Aug 20 2009 Karsten Hopp <karsten@redhat.com> 7.2.245-3
- change range of system ids in /etc/profile.d/vim/* (#518555)
* Mon Aug 03 2009 Karsten Hopp <karsten@redhat.com> 7.2.245-2
- add fix for glibc fortify segfault (#514717, Adam Tkac)
* Sat Aug 01 2009 Karsten Hopp <karsten@redhat.com> 7.2.245-1
- add 97 upstream patches to get to patchlevel 245
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:7.2.148-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Fri Mar 27 2009 Karsten Hopp <karsten@redhat.com> 7.2.148-1
- patchlevel 148, fixes #461417
* Tue Mar 10 2009 Karsten Hopp <karsten@redhat.com> 7.2.132-1
- patchlevel 132, fixes accesses to freed memory
* Wed Mar 04 2009 Karsten Hopp <karsten@redhat.com> 7.2.131-1
- patchlevel 131
* Tue Feb 24 2009 Karsten Hopp <karsten@redhat.com> 7.2.127-1
- patchlevel 127
* Mon Feb 23 2009 Karsten Hopp <karsten@redhat.com> 7.2.124-1
- patchlevel 124
* Mon Jan 26 2009 Karsten Hopp <karsten@redhat.com> 7.2.088-1
- patchlevel 88
* Thu Jan 08 2009 Karsten Hopp <karsten@redhat.com> 7.2.079-2
- patchlevel 79
* Thu Dec 04 2008 Jesse Keating <jkeating@redhat.com> - 7.2.060-2
- Rebuild for new python.
* Mon Dec 01 2008 Karsten Hopp <karsten@redhat.com> 7.2.060-1
- patchlevel 60
* Mon Nov 10 2008 Karsten Hopp <karsten@redhat.com> 7.2.032-1
- patchlevel 32
* Mon Nov 03 2008 Karsten Hopp <karsten@redhat.com> 7.2.026-2
- add more /usr/share/vim/vimfiles directories (#444387)
* Mon Nov 03 2008 Karsten Hopp <karsten@redhat.com> 7.2.026-1
- patchlevel 26
- own some directories in /usr/share/vim/vimfiles (#469491)
* Tue Oct 21 2008 Karsten Hopp <karsten@redhat.com> 7.2.025-2
- re-enable clean
* Mon Oct 20 2008 Karsten Hopp <karsten@redhat.com> 7.2.025-1
- patchlevel 25
- add Categories tag to desktop file (#226526)
- add requirement on hicolor-icon-theme to vim-X11 (#226526)
- drop Amiga info files (#226526)
- remove non-utf8 man pages (#226526)
- drop Application from categories (#226526)
* Tue Sep 30 2008 Karsten Hopp <karsten@redhat.com> 7.2.022-1
- patchlevel 22
* Mon Sep 08 2008 Karsten Hopp <karsten@redhat.com> 7.2.013-1
- patchlevel 13
* Mon Aug 25 2008 Karsten Hopp <karsten@redhat.com> 7.2.006-1
- patchlevel 6
* Mon Aug 18 2008 Karsten Hopp <karsten@redhat.com> 7.2.002-1
- patchlevel 2
- fix specfile template (#446070)
- old specfile changelog moved to Changelog.rpm
* Fri Aug 14 2008 Karsten Hopp <karsten@redhat.com> 7.2.000-1
- vim 7.2
- drop 330 patches

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

View File

@ -0,0 +1,399 @@
diff -ru vim70.orig/src/Makefile vim70.hunspell/src/Makefile
--- vim70.orig/src/Makefile 2006-12-15 12:29:41.000000000 +0000
+++ vim70.hunspell/src/Makefile 2006-12-14 11:11:20.000000000 +0000
@@ -1287,7 +1287,7 @@
PFLAGS = $(PROTO_FLAGS) -DPROTO $(LINT_CFLAGS)
ALL_LIB_DIRS = $(GUI_LIBS_DIR) $(X_LIBS_DIR)
-ALL_LIBS = $(GUI_LIBS1) $(GUI_X_LIBS) $(GUI_LIBS2) $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) $(LIBS) $(EXTRA_LIBS) $(MZSCHEME_LIBS) $(PERL_LIBS) $(PYTHON_LIBS) $(TCL_LIBS) $(RUBY_LIBS) $(PROFILE_LIBS)
+ALL_LIBS = $(GUI_LIBS1) $(GUI_X_LIBS) $(GUI_LIBS2) $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) $(LIBS) $(EXTRA_LIBS) $(MZSCHEME_LIBS) $(PERL_LIBS) $(PYTHON_LIBS) $(TCL_LIBS) $(RUBY_LIBS) $(PROFILE_LIBS) -lhunspell-1.1
# abbreviations
DEST_BIN = $(DESTDIR)$(BINDIR)
diff -ru vim70.orig/src/spell.c vim70.hunspell/src/spell.c
--- vim70.orig/src/spell.c 2006-12-15 12:29:44.000000000 +0000
+++ vim70.hunspell/src/spell.c 2006-12-15 12:27:49.000000000 +0000
@@ -319,6 +319,8 @@
# include <time.h> /* for time_t */
#endif
+#include "hunspell/hunspell.h"
+
#define MAXWLEN 250 /* Assume max. word len is this many bytes.
Some places assume a word length fits in a
byte, thus it can't be above 255. */
@@ -428,6 +430,8 @@
#define SP_FORMERROR -2 /* format error in spell file */
#define SP_OTHERERROR -3 /* other error while reading spell file */
+#define MAXREGIONS 20
+
/*
* Structure used to store words and other info for one language, loaded from
* a .spl file.
@@ -450,6 +454,10 @@
char_u *sl_name; /* language name "en", "en.rare", "nl", etc. */
char_u *sl_fname; /* name of .spl file */
int sl_add; /* TRUE if it's a .add file. */
+ int sl_ishunspell; /* TRUE if it's an unconverted hunspell aff/dic combination. */
+ Hunhandle *sl_hunspell;
+ vimconv_T sl_tohunconv;
+ vimconv_T sl_fromhunconv;
char_u *sl_fbyts; /* case-folded word bytes */
idx_T *sl_fidxs; /* case-folded word indexes */
@@ -460,7 +468,7 @@
char_u *sl_info; /* infotext string or NULL */
- char_u sl_regions[17]; /* table with up to 8 region names plus NUL */
+ char_u sl_regions[MAXREGIONS * 2 + 1]; /* table with up to 8 region names plus NUL */
char_u *sl_midword; /* MIDWORD string or NULL */
@@ -997,6 +1005,36 @@
static char_u *repl_from = NULL;
static char_u *repl_to = NULL;
+static void
+ensurehunspellinit(lp)
+ slang_T *lp;
+{
+ if (!lp->sl_hunspell)
+ {
+ char_u *dic = lp->sl_fname;
+ char_u *aff = vim_strnsave(dic, strlen(dic));
+
+ vim_strncpy(aff + strlen(aff) - 3, "aff", 3);
+
+ lp->sl_hunspell = Hunspell_create(aff, dic);
+
+ vim_free(aff);
+
+ if (convert_setup(&lp->sl_tohunconv, spell_enc(),
+ Hunspell_get_dic_encoding(lp->sl_hunspell)) == FAIL)
+ {
+ lp->sl_tohunconv.vc_fail = TRUE;
+ }
+
+ if (convert_setup(&lp->sl_fromhunconv,
+ Hunspell_get_dic_encoding(lp->sl_hunspell), spell_enc()) == FAIL)
+ {
+ lp->sl_fromhunconv.vc_fail = TRUE;
+ }
+ }
+}
+
+
/*
* Main spell-checking function.
* "ptr" points to a character that could be the start of a word.
@@ -1101,27 +1139,70 @@
{
mi.mi_lp = LANGP_ENTRY(wp->w_buffer->b_langp, lpi);
+ if (mi.mi_lp->lp_slang->sl_ishunspell)
+ {
+ slang_T *lp = mi.mi_lp->lp_slang;
+ char_u *converted = 0;
+ char_u *thisword;
+ char_u *mi_end = mi.mi_end;
+ char_u *mi_final = mi.mi_word + strlen(mi.mi_word);
+
+ while (1)
+ {
+ ensurehunspellinit(lp);
+ if ((lp->sl_tohunconv.vc_fail == TRUE) || (lp->sl_fromhunconv.vc_fail == TRUE))
+ break;
+
+ if (mi_end != mi.mi_word)
+ {
+ thisword = vim_strnsave(mi.mi_word, mi_end - mi.mi_word);
+ converted = string_convert(&lp->sl_tohunconv, thisword, NULL);
+ if (converted)
+ {
+ if (Hunspell_spell(lp->sl_hunspell, converted) != 0)
+ {
+ mi.mi_result = SP_OK;
+ mi.mi_end = mi.mi_cend = mi.mi_word + strlen(thisword);
+ }
+ vim_free(converted);
+ }
+ vim_free(thisword);
+ }
+
+ if (mi_end == mi_final)
+ break;
+
+ do
+ {
+ mb_ptr_adv(mi_end);
+ } while (*mi_end != NUL && spell_iswordp(mi_end, wp->w_buffer));
+ }
+ }
+
/* If reloading fails the language is still in the list but everything
* has been cleared. */
- if (mi.mi_lp->lp_slang->sl_fidxs == NULL)
+ if (!mi.mi_lp->lp_slang->sl_ishunspell && mi.mi_lp->lp_slang->sl_fidxs == NULL)
continue;
- /* Check for a matching word in case-folded words. */
- find_word(&mi, FIND_FOLDWORD);
+ if (!mi.mi_lp->lp_slang->sl_ishunspell)
+ {
+ /* Check for a matching word in case-folded words. */
+ find_word(&mi, FIND_FOLDWORD);
- /* Check for a matching word in keep-case words. */
- find_word(&mi, FIND_KEEPWORD);
+ /* Check for a matching word in keep-case words. */
+ find_word(&mi, FIND_KEEPWORD);
- /* Check for matching prefixes. */
- find_prefix(&mi, FIND_FOLDWORD);
+ /* Check for matching prefixes. */
+ find_prefix(&mi, FIND_FOLDWORD);
- /* For a NOBREAK language, may want to use a word without a following
- * word as a backup. */
- if (mi.mi_lp->lp_slang->sl_nobreak && mi.mi_result == SP_BAD
- && mi.mi_result2 != SP_BAD)
- {
- mi.mi_result = mi.mi_result2;
- mi.mi_end = mi.mi_end2;
+ /* For a NOBREAK language, may want to use a word without a following
+ * word as a backup. */
+ if (mi.mi_lp->lp_slang->sl_nobreak && mi.mi_result == SP_BAD
+ && mi.mi_result2 != SP_BAD)
+ {
+ mi.mi_result = mi.mi_result2;
+ mi.mi_end = mi.mi_end2;
+ }
}
/* Count the word in the first language where it's found to be OK. */
@@ -2359,6 +2440,80 @@
if (r == FAIL)
{
+# define HUNSPELLDICT "/usr/share/myspell/"
+ DIR *dirp = opendir(HUNSPELLDICT);
+ if (dirp != NULL)
+ {
+ slang_T* thislang[MAXREGIONS] = {0};
+ slang_T *lp = 0;
+ struct dirent *dp;
+ int i = 0;
+
+ while ((dp = readdir(dirp)) != NULL)
+ {
+ char_u final_name[MAXPATHL];
+ char_u spf_name[MAXPATHL];
+ char_u thisregion[3] = {0};
+ char *resolvedlink = final_name;
+ int j, regionpos;
+
+ if (strncmp(dp->d_name, lang, strlen(lang)) != 0)
+ continue;
+
+ if ((strlen(dp->d_name) <= 4) || (dp->d_name[strlen(lang)] != '_'))
+ continue;
+
+ if (strncmp(".dic", dp->d_name + strlen(dp->d_name) - 4, 4) != 0)
+ continue;
+
+ vim_strncpy(spf_name, HUNSPELLDICT, strlen(HUNSPELLDICT));
+ vim_strncpy(spf_name + strlen(HUNSPELLDICT), dp->d_name, strlen(HUNSPELLDICT));
+
+ if (realpath(spf_name, resolvedlink) != resolvedlink)
+ continue;
+
+ thisregion[0] = tolower(dp->d_name[strlen(lang)+1]);
+ thisregion[1] = tolower(dp->d_name[strlen(lang)+1+1]);
+
+ r = OK;
+
+ for (j = 0; j < MAXREGIONS; ++j)
+ {
+ if (thislang[j] && (strcmp(thislang[j]->sl_fname, final_name) == 0))
+ break;
+ }
+
+ if (j < MAXREGIONS)
+ lp = thislang[j];
+ else
+ {
+ lp = slang_alloc(lang);
+ lp->sl_ishunspell = TRUE;
+
+ lp->sl_fname = vim_strsave(resolvedlink);
+
+ lp->sl_next = first_lang;
+ first_lang = lp;
+ thislang[i] = lp;
+ }
+
+ regionpos = 0;
+ while (lp->sl_regions[regionpos] != 0) ++regionpos;
+
+ //silently lose regions which won't fit in
+ if (regionpos == MAXREGIONS * 2)
+ continue;
+
+ vim_strncpy(lp->sl_regions + regionpos, thisregion, 2);
+
+ ++i;
+ }
+ closedir(dirp);
+ }
+ }
+
+ if (r == FAIL)
+ {
smsg((char_u *)_("Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""),
lang, spell_enc(), lang);
}
@@ -2429,6 +2584,9 @@
slang_free(lp)
slang_T *lp;
{
+ Hunspell_destroy(lp->sl_hunspell);
+ convert_setup(&lp->sl_tohunconv, NULL, NULL);
+ convert_setup(&lp->sl_fromhunconv, NULL, NULL);
vim_free(lp->sl_name);
vim_free(lp->sl_fname);
slang_clear(lp);
@@ -2974,7 +3132,7 @@
{
int i;
- if (len > 16)
+ if (len > MAXREGIONS*2)
return SP_FORMERROR;
for (i = 0; i < len; ++i)
lp->sl_regions[i] = getc(fd); /* <regionname> */
@@ -4112,6 +4270,7 @@
/* loop over comma separated language names. */
for (splp = buf->b_p_spl; *splp != NUL; )
{
+ int hunspellregionunsupported;
/* Get one language name. */
copy_option_part(&splp, lang, MAXWLEN, ",");
@@ -4182,6 +4341,7 @@
/*
* Loop over the languages, there can be several files for "lang".
*/
+ hunspellregionunsupported = 0;
for (slang = first_lang; slang != NULL; slang = slang->sl_next)
if (filename ? fullpathcmp(lang, slang->sl_fname, FALSE) == FPC_SAME
: STRICMP(lang, slang->sl_name) == 0)
@@ -4199,6 +4359,11 @@
/* This addition file is for other regions. */
region_mask = 0;
}
+ else if (slang->sl_ishunspell)
+ {
+ region_mask = 0;
+ hunspellregionunsupported++;
+ }
else
/* This is probably an error. Give a warning and
* accept the words anyway. */
@@ -4207,7 +4372,10 @@
region);
}
else
+ {
+ hunspellregionunsupported--;
region_mask = 1 << c;
+ }
}
if (region_mask != 0)
@@ -4225,6 +4393,9 @@
nobreak = TRUE;
}
}
+
+ if (region && hunspellregionunsupported >= 1)
+ smsg((char_u *) _("Warning: region %s not supported"), region);
}
/* round 0: load int_wordlist, if possible.
@@ -4832,7 +5003,7 @@
char_u *si_info; /* info text chars or NULL */
int si_region_count; /* number of regions supported (1 when there
are no regions) */
- char_u si_region_name[16]; /* region names; used only if
+ char_u si_region_name[MAXREGIONS*2]; /* region names; used only if
* si_region_count > 1) */
garray_T si_rep; /* list of fromto_T entries from REP lines */
@@ -7093,7 +7264,7 @@
else
{
line += 8;
- if (STRLEN(line) > 16)
+ if (STRLEN(line) > MAXREGIONS)
smsg((char_u *)_("Too many regions in %s line %d: %s"),
fname, lnum, line);
else
@@ -8973,7 +9144,7 @@
char_u wfname[MAXPATHL];
char_u **innames;
int incount;
- afffile_T *(afile[8]);
+ afffile_T *(afile[MAXREGIONS]);
int i;
int len;
struct stat st;
@@ -9040,8 +9211,8 @@
EMSG(_(e_invarg)); /* need at least output and input names */
else if (vim_strchr(gettail(wfname), '_') != NULL)
EMSG(_("E751: Output file name must not have region name"));
- else if (incount > 8)
- EMSG(_("E754: Only up to 8 regions supported"));
+ else if (incount > MAXREGIONS)
+ EMSG2(_("E754: Only up to %d regions supported"), MAXREGIONS);
else
{
/* Check for overwriting before doing things that may take a lot of
@@ -11097,6 +11268,36 @@
{
lp = LANGP_ENTRY(curbuf->b_langp, lpi);
+ if (lp->lp_slang->sl_ishunspell)
+ {
+ slang_T *slp = lp->lp_slang;
+ char **slst;
+ char_u *converted = 0;
+
+ ensurehunspellinit(slp);
+
+ converted = string_convert(&slp->sl_tohunconv, su->su_fbadword, NULL);
+ if (converted)
+ {
+ int suggests;
+ suggests = Hunspell_suggest(slp->sl_hunspell, &slst, converted);
+ if (suggests > 0)
+ {
+ int i;
+ char_u *suggest;
+ for (i = 0; i < suggests; ++i)
+ {
+ suggest = string_convert(&slp->sl_fromhunconv, slst[i], NULL);
+ add_suggestion(su, &su->su_ga, suggest, su->su_badlen, i, 0, FALSE,
+ slp, FALSE);
+ vim_free(suggest);
+ }
+ free(slst);
+ }
+ vim_free(converted);
+ }
+ }
+
/* If reloading a spell file fails it's still in the list but
* everything has been cleared. */
if (lp->lp_slang->sl_fbyts == NULL)

View File

@ -24,7 +24,7 @@ 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: 19%{?dist}.4 Release: 21%{?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
@ -47,10 +47,7 @@ Source16: macros.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}
Patch2011: vim-7.0-hunspell.patch Patch2011: vim-7.0-hunspell.patch
BuildRequires: hunspell-devel
%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
@ -100,7 +97,7 @@ Patch3032: 0001-patch-8.2.4218-illegal-memory-access-with-bracketed-.patch
Patch3033: 0001-patch-8.2.4253-using-freed-memory-when-substitute-wi.patch Patch3033: 0001-patch-8.2.4253-using-freed-memory-when-substitute-wi.patch
# CVE-2022-0361 vim: Heap-based Buffer Overflow in GitHub repository # CVE-2022-0361 vim: Heap-based Buffer Overflow in GitHub repository
Patch3034: 0001-patch-8.2.4215-illegal-memory-access-when-copying-li.patch Patch3034: 0001-patch-8.2.4215-illegal-memory-access-when-copying-li.patch
# CVE-2022-1154 vim: use after free in utf_ptr2char # 2073391 - CVE-2022-1154 vim: use after free in utf_ptr2char
Patch3035: 0001-patch-8.2.4646-using-buffer-line-after-it-has-been-f.patch Patch3035: 0001-patch-8.2.4646-using-buffer-line-after-it-has-been-f.patch
# CVE-2022-1621 vim: heap buffer overflow # CVE-2022-1621 vim: heap buffer overflow
Patch3036: 0001-patch-8.2.4919-can-add-invalid-bytes-with-spellgood.patch Patch3036: 0001-patch-8.2.4919-can-add-invalid-bytes-with-spellgood.patch
@ -112,6 +109,11 @@ Patch3038: 0001-patch-8.2.4977-memory-access-error-when-substitute-e.patch
Patch3039: 0001-patch-8.2.5023-substitute-overwrites-allocated-buffe.patch Patch3039: 0001-patch-8.2.5023-substitute-overwrites-allocated-buffe.patch
# CVE-2022-1927 vim: buffer over-read in utf_ptr2char() in mbyte.c # CVE-2022-1927 vim: buffer over-read in utf_ptr2char() in mbyte.c
Patch3040: 0001-patch-8.2.5037-cursor-position-may-be-invalid-after-.patch Patch3040: 0001-patch-8.2.5037-cursor-position-may-be-invalid-after-.patch
# RHEL-112003 CVE-2025-53905 vim: Vim path traversial
Patch3041: 0001-patch-9.1.1552-security-path-traversal-issue-in-tar..patch
# RHEL-112007 CVE-2025-53906 vim: Vim path traversal
Patch3042: 0001-patch-9.1.1551-security-path-traversal-issue-in-zip..patch
# gcc is no longer in buildroot by default # gcc is no longer in buildroot by default
BuildRequires: gcc BuildRequires: gcc
@ -136,6 +138,11 @@ BuildRequires: lua-devel
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
%if %{withhunspell}
BuildRequires: hunspell-devel
%endif
Epoch: 2 Epoch: 2
Conflicts: filesystem < 3 Conflicts: filesystem < 3
@ -153,7 +160,7 @@ 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 < 2: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
@ -176,11 +183,11 @@ 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 = %{epoch}:%{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 < 2: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
@ -195,7 +202,7 @@ 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 = %{epoch}:%{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
@ -226,7 +233,6 @@ 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.
@ -242,7 +248,7 @@ 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 = %{epoch}:%{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))
@ -329,6 +335,8 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk
%patch3038 -p1 -b .cve1785 %patch3038 -p1 -b .cve1785
%patch3039 -p1 -b .cve1897 %patch3039 -p1 -b .cve1897
%patch3040 -p1 -b .cve1927 %patch3040 -p1 -b .cve1927
%patch -P 3041 -p1 -b .CVE-2025-53905
%patch -P 3042 -p1 -b .CVE-2025-53906
%build %build
%if 0%{?rhel} > 7 %if 0%{?rhel} > 7
@ -847,19 +855,23 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags
%{_datadir}/icons/locolor/*/apps/* %{_datadir}/icons/locolor/*/apps/*
%changelog %changelog
* Tue Jun 14 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-19.4 * Wed Sep 17 2025 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-21
- RHEL-112003 CVE-2025-53905 vim: Vim path traversial
- RHEL-112007 CVE-2025-53906 vim: Vim path traversal
* Tue Jun 14 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-20
- fix issue reported by covscan - fix issue reported by covscan
* Mon Jun 13 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-19.3 * Mon Jun 13 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-20
- CVE-2022-1785 vim: Out-of-bounds Write - CVE-2022-1785 vim: Out-of-bounds Write
- CVE-2022-1897 vim: out-of-bounds write in vim_regsub_both() in regexp.c - CVE-2022-1897 vim: out-of-bounds write in vim_regsub_both() in regexp.c
- CVE-2022-1927 vim: buffer over-read in utf_ptr2char() in mbyte.c - CVE-2022-1927 vim: buffer over-read in utf_ptr2char() in mbyte.c
* Wed May 25 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-19.2 * Sat May 14 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-20
- CVE-2022-1621 vim: heap buffer overflow - CVE-2022-1621 vim: heap buffer overflow
- CVE-2022-1629 vim: buffer over-read - CVE-2022-1629 vim: buffer over-read
* Sat Apr 09 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-19.1 * Sat Apr 09 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-20
- CVE-2022-1154 vim: use after free in utf_ptr2char - CVE-2022-1154 vim: use after free in utf_ptr2char
* Tue Feb 08 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-19 * Tue Feb 08 2022 Zdenek Dohnal <zdohnal@redhat.com> - 2:8.0.1763-19