diff --git a/7.2.443 b/7.2.443 new file mode 100644 index 0000000..d18ccc9 --- /dev/null +++ b/7.2.443 @@ -0,0 +1,116 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.443 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.443 +Problem: Using taglist() on a tag file with duplicate fields generates an + internal error. (Peter Odding) +Solution: Check for duplicate field names. +Files: src/eval.c, src/proto/eval.pro, src/tag.c + + +*** ../vim-7.2.442/src/eval.c 2010-05-28 22:06:41.000000000 +0200 +--- src/eval.c 2010-06-12 19:59:09.000000000 +0200 +*************** +*** 451,457 **** + static void dictitem_remove __ARGS((dict_T *dict, dictitem_T *item)); + static dict_T *dict_copy __ARGS((dict_T *orig, int deep, int copyID)); + static long dict_len __ARGS((dict_T *d)); +- static dictitem_T *dict_find __ARGS((dict_T *d, char_u *key, int len)); + static char_u *dict2string __ARGS((typval_T *tv, int copyID)); + static int get_dict_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate)); + static char_u *echo_string __ARGS((typval_T *tv, char_u **tofree, char_u *numbuf, int copyID)); +--- 451,456 ---- +*************** +*** 7012,7018 **** + * If "len" is negative use strlen(key). + * Returns NULL when not found. + */ +! static dictitem_T * + dict_find(d, key, len) + dict_T *d; + char_u *key; +--- 7011,7017 ---- + * If "len" is negative use strlen(key). + * Returns NULL when not found. + */ +! dictitem_T * + dict_find(d, key, len) + dict_T *d; + char_u *key; +*** ../vim-7.2.442/src/proto/eval.pro 2010-01-19 15:51:29.000000000 +0100 +--- src/proto/eval.pro 2010-06-12 19:59:13.000000000 +0200 +*************** +*** 56,61 **** +--- 56,62 ---- + void dictitem_free __ARGS((dictitem_T *item)); + int dict_add __ARGS((dict_T *d, dictitem_T *item)); + int dict_add_nr_str __ARGS((dict_T *d, char *key, long nr, char_u *str)); ++ dictitem_T *dict_find __ARGS((dict_T *d, char_u *key, int len)); + char_u *get_dict_string __ARGS((dict_T *d, char_u *key, int save)); + long get_dict_number __ARGS((dict_T *d, char_u *key)); + char_u *get_function_name __ARGS((expand_T *xp, int idx)); +*** ../vim-7.2.442/src/tag.c 2010-02-24 14:46:58.000000000 +0100 +--- src/tag.c 2010-06-12 20:01:45.000000000 +0200 +*************** +*** 3771,3777 **** + static int add_tag_field __ARGS((dict_T *dict, char *field_name, char_u *start, char_u *end)); + + /* +! * Add a tag field to the dictionary "dict" + */ + static int + add_tag_field(dict, field_name, start, end) +--- 3771,3778 ---- + static int add_tag_field __ARGS((dict_T *dict, char *field_name, char_u *start, char_u *end)); + + /* +! * Add a tag field to the dictionary "dict". +! * Return OK or FAIL. + */ + static int + add_tag_field(dict, field_name, start, end) +*************** +*** 3783,3788 **** +--- 3784,3800 ---- + char_u buf[MAXPATHL]; + int len = 0; + ++ /* check that the field name doesn't exist yet */ ++ if (dict_find(dict, (char_u *)field_name, -1) != NULL) ++ { ++ if (p_verbose > 0) ++ { ++ verbose_enter(); ++ smsg((char_u *)_("Duplicate field name: %s"), field_name); ++ verbose_leave(); ++ } ++ return FAIL; ++ } + if (start != NULL) + { + if (end == NULL) +*** ../vim-7.2.442/src/version.c 2010-06-05 12:49:40.000000000 +0200 +--- src/version.c 2010-06-12 20:05:27.000000000 +0200 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 443, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +191. You rate eating establishments not by the quality of the food, + but by the availability of electrical outlets for your PowerBook. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/README.patches b/README.patches index a70d74c..27dfe48 100644 --- a/README.patches +++ b/README.patches @@ -474,3 +474,4 @@ Individual patches for Vim 7.2: 5861 7.2.440 crash when deleting a funcref in the function it refers to 3446 7.2.441 when using ":earlier" undo information may be wrong 7872 7.2.442 (after 7.2.201) copy/paste with OpenOffice doesn't work + 3953 7.2.443 taglist() on tag file with duplicate fields causes int. error diff --git a/vim.spec b/vim.spec index 561bc58..2dfc734 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim72%{?beta} -%define patchlevel 442 +%define patchlevel 443 Summary: The VIM editor URL: http://www.vim.org/ @@ -508,6 +508,7 @@ Patch439: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.439 Patch440: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.440 Patch441: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.441 Patch442: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.442 +Patch443: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.443 Patch3000: vim-7.0-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -1088,6 +1089,7 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch440 -p0 %patch441 -p0 %patch442 -p0 +%patch443 -p0 # install spell files @@ -1552,6 +1554,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Sun Jun 13 2010 Karsten Hopp 7.2.443-1 +- patchlevel 443 + * Sat Jun 05 2010 Karsten Hopp 7.2.442-1 - patchlevel 442