FreeBSD Bugzilla – Attachment 183429 Details for
Bug 219941
editors/vim usability regression, at least for vim-lite users -> new port editors/vim7
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Update vim-7.4.2367 as separate vim7 port.
vim_r422333_vim7-7.4.2367_CVEp2.diff (text/plain), 5.60 KB, created by
Harald Schmalzbauer
on 2017-06-12 13:01:15 UTC
(
hide
)
Description:
Update vim-7.4.2367 as separate vim7 port.
Filename:
MIME Type:
Creator:
Harald Schmalzbauer
Created:
2017-06-12 13:01:15 UTC
Size:
5.60 KB
patch
obsolete
>Index: vim/Makefile >=================================================================== >--- vim/Makefile (Revision 422333) >+++ vim/Makefile (Arbeitskopie) >@@ -1,13 +1,15 @@ > # Created by: David O'Brien <obrien@cs.ucdavis.edu> > # $FreeBSD$ > >-PORTNAME= vim >+PORTNAME= vim7 > PORTVERSION= 7.4.2367 > DISTVERSIONPREFIX= v >+PORTREVISION= CVEp2 > CATEGORIES?= editors >+CONFLICTS_INSTALL= ${VPNAME}-* > >-MAINTAINER?= sunpoet@FreeBSD.org >-COMMENT?= Improved version of the vi editor >+MAINTAINER?= ports@FreeBSD.org >+COMMENT?= Improved version of the vi editor (pre-GTK3) > > OPTIONS_DEFINE= CSCOPE DEFAULT_VIMRC EXUBERANT_CTAGS LUA NLS PERL PYTHON RUBY TCL XTERM_SAVE > OPTIONS_SINGLE= UI >@@ -30,16 +32,20 @@ > USES= cpe iconv ncurses pkgconfig shebangfix > WANT_GNOME= yes > >+VPNAME= vim # $PORTNAME differs from upstream with this private port. > PLIST_SUB= VIM_VER=${VIM_VER} > PORTDATA= ${VIM_VER} >+DATADIR= ${PREFIX}/share/${VPNAME} > >-VIM_VER= ${PORTNAME}${PORTVERSION:R:S|.||g} >+VIM_VER= ${VPNAME}${PORTVERSION:R:S|.||g} > > USE_GITHUB= yes >+GH_ACCOUNT= ${VPNAME} >+GH_PROJECT= ${VPNAME} > > CPE_VERSION= ${PORTVERSION:R} > >-SLAVEDIRS= editors/vim-lite >+SLAVEDIRS= editors/vim7-lite > > SHEBANG_FILES= runtime/tools/efm_perl.pl > >Index: vim/files/patch-vim_CVE-2016-1248 >=================================================================== >--- vim/files/patch-vim_CVE-2016-1248 (nicht existent) >+++ vim/files/patch-vim_CVE-2016-1248 (Arbeitskopie) >@@ -0,0 +1,116 @@ >+--- src/option.c.orig 2016-09-12 13:32:02.000000000 +0200 >++++ src/option.c 2017-06-12 11:57:58.845378000 +0200 >+@@ -5823,6 +5823,21 @@ >+ } >+ >+ /* >++ * Return TRUE if "val" is a valid 'filetype' name. >++ * Also used for 'syntax' and 'keymap'. >++ */ >++ static int >++valid_filetype(char_u *val) >++{ >++ char_u *s; >++ >++ for (s = val; *s != NUL; ++s) >++ if (!ASCII_ISALNUM(*s) && vim_strchr((char_u *)".-_", *s) == NULL) >++ return FALSE; >++ return TRUE; >++} >++ >++/* >+ * Handle string options that need some action to perform when changed. >+ * Returns NULL for success, or an error message for an error. >+ */ >+@@ -6235,8 +6250,11 @@ >+ #ifdef FEAT_KEYMAP >+ else if (varp == &curbuf->b_p_keymap) >+ { >+- /* load or unload key mapping tables */ >+- errmsg = keymap_init(); >++ if (!valid_filetype(*varp)) >++ errmsg = e_invarg; >++ else >++ /* load or unload key mapping tables */ >++ errmsg = keymap_init(); >+ >+ if (errmsg == NULL) >+ { >+@@ -7222,6 +7240,22 @@ >+ } >+ #endif >+ >++#ifdef FEAT_AUTOCMD >++ else if (gvarp == &p_ft) >++ { >++ if (!valid_filetype(*varp)) >++ errmsg = e_invarg; >++ } >++#endif >++ >++#ifdef FEAT_SYN_HL >++ else if (gvarp == &p_syn) >++ { >++ if (!valid_filetype(*varp)) >++ errmsg = e_invarg; >++ } >++#endif >++ >+ /* Options that are a list of flags. */ >+ else >+ { >+--- src/testdir/test_options.vim.orig 2016-09-12 13:32:02.000000000 +0200 >++++ src/testdir/test_options.vim 2017-06-12 11:57:58.845713000 +0200 >+@@ -48,3 +48,52 @@ >+ endif >+ endfunc >+ >++func Test_filetype_valid() >++ set ft=valid_name >++ call assert_equal("valid_name", &filetype) >++ set ft=valid-name >++ call assert_equal("valid-name", &filetype) >++ >++ call assert_fails(":set ft=wrong;name", "E474:") >++ call assert_fails(":set ft=wrong\\\\name", "E474:") >++ call assert_fails(":set ft=wrong\\|name", "E474:") >++ call assert_fails(":set ft=wrong/name", "E474:") >++ call assert_fails(":set ft=wrong\\\nname", "E474:") >++ call assert_equal("valid-name", &filetype) >++ >++ exe "set ft=trunc\x00name" >++ call assert_equal("trunc", &filetype) >++endfunc >++ >++func Test_syntax_valid() >++ set syn=valid_name >++ call assert_equal("valid_name", &syntax) >++ set syn=valid-name >++ call assert_equal("valid-name", &syntax) >++ >++ call assert_fails(":set syn=wrong;name", "E474:") >++ call assert_fails(":set syn=wrong\\\\name", "E474:") >++ call assert_fails(":set syn=wrong\\|name", "E474:") >++ call assert_fails(":set syn=wrong/name", "E474:") >++ call assert_fails(":set syn=wrong\\\nname", "E474:") >++ call assert_equal("valid-name", &syntax) >++ >++ exe "set syn=trunc\x00name" >++ call assert_equal("trunc", &syntax) >++endfunc >++ >++func Test_keymap_valid() >++ call assert_fails(":set kmp=valid_name", "E544:") >++ call assert_fails(":set kmp=valid_name", "valid_name") >++ call assert_fails(":set kmp=valid-name", "E544:") >++ call assert_fails(":set kmp=valid-name", "valid-name") >++ >++ call assert_fails(":set kmp=wrong;name", "E474:") >++ call assert_fails(":set kmp=wrong\\\\name", "E474:") >++ call assert_fails(":set kmp=wrong\\|name", "E474:") >++ call assert_fails(":set kmp=wrong/name", "E474:") >++ call assert_fails(":set kmp=wrong\\\nname", "E474:") >++ >++ call assert_fails(":set kmp=trunc\x00name", "E544:") >++ call assert_fails(":set kmp=trunc\x00name", "trunc") >++endfunc > >Index: vim/files/patch-vim_CVE-2017-5953 >=================================================================== >--- vim/files/patch-vim_CVE-2017-5953 (nicht existent) >+++ vim/files/patch-vim_CVE-2017-5953 (Arbeitskopie) >@@ -0,0 +1,12 @@ >+--- src/spellfile.c.orig 2016-09-12 13:32:02.000000000 +0200 >++++ src/spellfile.c 2017-06-12 11:53:50.234578000 +0200 >+@@ -1595,6 +1595,9 @@ >+ len = get4c(fd); >+ if (len < 0) >+ return SP_TRUNCERROR; >++ if (len >= 0x3ffffff) >++ /* Invalid length, multiply with sizeof(int) would overflow. */ >++ return SP_FORMERROR; >+ if (len > 0) >+ { >+ /* Allocate the byte array. */ > >Index: vim/files/vimrc >=================================================================== >--- vim/files/vimrc (Revision 422333) >+++ vim/files/vimrc (Arbeitskopie) >@@ -3,6 +3,7 @@ > endif > > let g:is_posix = 1 >+let skip_defaults_vim = 1 > set nocompatible > set bs=indent,eol,start > set history=50
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 219941
: 183429 |
183430
|
183431