To: vim-dev@vim.org Subject: patch 7.1.039 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 7.1.039 Problem: A tag in a help file that starts with "help-tags" and contains a percent sign may make Vim crash. (Ulf Harnhammar) Solution: Use puts() instead of fprintf(). Files: src/ex_cmds.c *** ../vim-7.1.038/src/ex_cmds.c Tue Jul 24 11:15:46 2007 --- src/ex_cmds.c Wed Jul 25 20:06:20 2007 *************** *** 6374,6382 **** for (i = 0; i < ga.ga_len; ++i) { s = ((char_u **)ga.ga_data)[i]; ! if (STRNCMP(s, "help-tags", 9) == 0) /* help-tags entry was added in formatted form */ ! fprintf(fd_tags, (char *)s); else { fprintf(fd_tags, "%s\t/*", s); --- 6374,6382 ---- for (i = 0; i < ga.ga_len; ++i) { s = ((char_u **)ga.ga_data)[i]; ! if (STRNCMP(s, "help-tags\t", 10) == 0) /* help-tags entry was added in formatted form */ ! fputs((char *)s, fd_tags); else { fprintf(fd_tags, "%s\t/*", s); *** ../vim-7.1.038/src/version.c Tue Jul 24 15:25:27 2007 --- src/version.c Wed Jul 25 22:41:18 2007 *************** *** 668,669 **** --- 668,671 ---- { /* Add new patch number below this line */ + /**/ + 39, /**/ -- On the other hand, you have different fingers. -- Steven Wright /// 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 ///