OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 15-Dec-2004 16:01:25
Branch: OPENPKG_2_1_SOLID Handle: 2004121515012400
Modified files: (Branch: OPENPKG_2_1_SOLID)
openpkg-src/vim vim.patch vim.spec
Log:
2004.052-vim; CAN-2004-1138
Summary:
Revision Changes Path
1.5.2.1 +142 -0 openpkg-src/vim/vim.patch
1.339.2.3 +1 -1 openpkg-src/vim/vim.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/vim/vim.patch
============================================================================
$ cvs diff -u -r1.5 -r1.5.2.1 vim.patch
--- openpkg-src/vim/vim.patch 8 Jun 2004 20:43:00 -0000 1.5
+++ openpkg-src/vim/vim.patch 15 Dec 2004 15:01:24 -0000 1.5.2.1
@@ -49,3 +49,145 @@
syn sync match specIfSync groupthere specIf "%endIf"
syn sync match shForSync grouphere shFor "\<for\>"
syn sync match shForSync groupthere shFor "\<in\>"
+
+CAN-2004-1138, unified diff version of original patch with docs stripped
+
+Subject: Patch 6.3.045
+From: Bram Moolenaar <[EMAIL PROTECTED]>
+------------
+Problem: Unusual characters in an option value may cause unexpected
+ behavior, especially for a modeline. (Ciaran McCreesh)
+Solution: Don't allow setting termcap options or 'printdevice' or
+ 'titleold' in a modeline. Don't list options for "termcap"
+ and "all" in a modeline. Don't allow unusual characters in
+ 'filetype', 'syntax', 'backupext', 'keymap', 'patchmode' and
+ 'langmenu'.
+
+Index: src/option.c
+--- vim63/src/option.c.orig 2004-05-15 12:20:06 +0200
++++ vim63/src/option.c 2004-12-15 15:33:49 +0100
+@@ -293,6 +293,7 @@
+ #define P_SECURE 0x40000L/* cannot change in modeline or secure mode */
+ #define P_GETTEXT 0x80000L/* expand default value with _() */
+ #define P_NOGLOB 0x100000L/* do not use local value for global vimrc
*/
++#define P_NFNAME 0x200000L/* only normal file name chars allowed */
+
+ /*
+ * options[] is initialized here.
+@@ -413,7 +414,7 @@
+ {"backupdir", "bdir",
P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP|P_SECURE,
+ (char_u *)&p_bdir, PV_NONE,
+ {(char_u *)DFLT_BDIR, (char_u *)0L}},
+- {"backupext", "bex", P_STRING|P_VI_DEF,
++ {"backupext", "bex", P_STRING|P_VI_DEF|P_NFNAME,
+ (char_u *)&p_bex, PV_NONE,
+ {
+ #ifdef VMS
+@@ -846,7 +847,7 @@
+ {"fileformats", "ffs", P_STRING|P_VIM|P_COMMA|P_NODUP,
+ (char_u *)&p_ffs, PV_NONE,
+ {(char_u *)DFLT_FFS_VI, (char_u *)DFLT_FFS_VIM}},
+- {"filetype", "ft", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB,
++ {"filetype", "ft", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME,
+ #ifdef FEAT_AUTOCMD
+ (char_u *)&p_ft, PV_FT,
+ {(char_u *)"", (char_u *)0L}
+@@ -1284,7 +1285,7 @@
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+ },
+- {"keymap", "kmp", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_RSTAT,
++ {"keymap", "kmp",
P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_RSTAT|P_NFNAME,
+ #ifdef FEAT_KEYMAP
+ (char_u *)&p_keymap, PV_KMAP,
+ {(char_u *)"", (char_u *)0L}
+@@ -1330,7 +1331,7 @@
+ {(char_u *)NULL,
+ #endif
+ (char_u *)0L}},
+- {"langmenu", "lm", P_STRING|P_VI_DEF,
++ {"langmenu", "lm", P_STRING|P_VI_DEF|P_NFNAME,
+ #if defined(FEAT_MENU) && defined(FEAT_MULTI_LANG)
+ (char_u *)&p_lm, PV_NONE,
+ #else
+@@ -1562,7 +1563,7 @@
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+ },
+- {"patchmode", "pm", P_STRING|P_VI_DEF,
++ {"patchmode", "pm", P_STRING|P_VI_DEF|P_NFNAME,
+ (char_u *)&p_pm, PV_NONE,
+ {(char_u *)"", (char_u *)0L}},
+ {"path", "pa", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
+@@ -1595,7 +1596,7 @@
+ (char_u *)NULL, PV_NONE,
+ #endif
+ {(char_u *)FALSE, (char_u *)0L}},
+- {"printdevice", "pdev", P_STRING|P_VI_DEF,
++ {"printdevice", "pdev", P_STRING|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_PRINTER
+ (char_u *)&p_pdev, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+@@ -1981,7 +1982,7 @@
+ {"switchbuf", "swb", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
+ (char_u *)&p_swb, PV_NONE,
+ {(char_u *)"", (char_u *)0L}},
+- {"syntax", "syn", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB,
++ {"syntax", "syn",
P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME,
+ #ifdef FEAT_SYN_HL
+ (char_u *)&p_syn, PV_SYN,
+ {(char_u *)"", (char_u *)0L}
+@@ -2086,7 +2087,7 @@
+ (char_u *)NULL, PV_NONE,
+ #endif
+ {(char_u *)85L, (char_u *)0L}},
+- {"titleold", NULL, P_STRING|P_VI_DEF|P_GETTEXT,
++ {"titleold", NULL, P_STRING|P_VI_DEF|P_GETTEXT|P_SECURE,
+ #ifdef FEAT_TITLE
+ (char_u *)&p_titleold, PV_NONE,
+ {(char_u *)N_("Thanks for flying Vim"),
+@@ -2321,7 +2322,7 @@
+ {(char_u *)0L, (char_u *)0L}},
+
+ /* terminal output codes */
+-#define p_term(sss, vvv) {sss, NULL, P_STRING|P_VI_DEF|P_RALL, \
++#define p_term(sss, vvv) {sss, NULL, P_STRING|P_VI_DEF|P_RALL|P_SECURE, \
+ (char_u *)&vvv, PV_NONE, \
+ {(char_u *)"", (char_u *)0L}},
+
+@@ -3302,7 +3303,8 @@
+ errmsg = NULL;
+ startarg = arg; /* remember for error message */
+
+- if (STRNCMP(arg, "all", 3) == 0 && !isalpha(arg[3]))
++ if (STRNCMP(arg, "all", 3) == 0 && !isalpha(arg[3])
++ && !(opt_flags & OPT_MODELINE))
+ {
+ /*
+ * ":set all" show all options.
+@@ -3318,7 +3320,7 @@
+ else
+ showoptions(1, opt_flags);
+ }
+- else if (STRNCMP(arg, "termcap", 7) == 0)
++ else if (STRNCMP(arg, "termcap", 7) == 0 && !(opt_flags & OPT_MODELINE))
+ {
+ showoptions(2, opt_flags);
+ show_termcodes();
+@@ -4604,6 +4606,15 @@
+ errmsg = e_secure;
+ }
+
++ /* Check for a "normal" file name in some options. Disallow a path
++ * separator (slash and/or backslash), wildcards and characters that are
++ * often illegal in a file name. */
++ else if ((options[opt_idx].flags & P_NFNAME)
++ && vim_strpbrk(*varp, "/\\*?[|<>") != NULL)
++ {
++ errmsg = e_invarg;
++ }
++
+ /* 'term' */
+ else if (varp == &T_NAME)
+ {
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/vim/vim.spec
============================================================================
$ cvs diff -u -r1.339.2.2 -r1.339.2.3 vim.spec
--- openpkg-src/vim/vim.spec 3 Jul 2004 07:50:09 -0000 1.339.2.2
+++ openpkg-src/vim/vim.spec 15 Dec 2004 15:01:24 -0000 1.339.2.3
@@ -39,7 +39,7 @@
Group: Editor
License: Charityware
Version: %{V_vl}.%{V_pl}
-Release: 2.1.0
+Release: 2.1.1
# package options
%option with_x11 no
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]